pyams_content.component.keynumber
package ⊞¶
Subpackages¶
pyams_content.component.keynumber.interfaces
¶
-
interface
pyams_content.component.keynumber.interfaces.
IKeyNumber
[source]¶ Extends:
zope.annotation.interfaces.IAttributeAnnotatable
Base key number interface
-
__parent__
¶ Implementation: zope.schema.Field
Read Only: False Required: True Default Value: None
-
visible
¶ Visible?
Is this key number visible in front-office?
Implementation: zope.schema.Bool
Read Only: False Required: True Default Value: True Allowed Type: bool
-
label
¶ key-number-label
Small text to be displayed above number (according to selected renderer)
Implementation: pyams_i18n.schema.I18nTextLineField
Read Only: False Required: False Default Value: None Allowed Type: dict
Key Type
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: str
Value Type
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
number
¶ Number
Key number value
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
unit
¶ key-number-unit
Displayed unit
Implementation: pyams_i18n.schema.I18nTextLineField
Read Only: False Required: False Default Value: None Allowed Type: dict
Key Type
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: str
Value Type
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
text
¶ Associated text
The way this text will be rendered depends on presentation template
Implementation: pyams_i18n.schema.I18nTextLineField
Read Only: False Required: False Default Value: None Allowed Type: dict
Key Type
Implementation: zope.schema.TextLine
Read Only: False Required: True Default Value: None Allowed Type: str
Value Type
Implementation: zope.schema.TextLine
Read Only: False Required: False Default Value: None Allowed Type: str
-
-
interface
pyams_content.component.keynumber.interfaces.
IKeyNumberContainer
[source]¶ Extends:
pyams_content.interfaces.container.IOrderedContainer
Key numbers container interface
-
__setitem__
(key, value)¶ Add the given object to the container under the given name.
Raises a
TypeError
if the key is not a unicode or ascii string.Raises a
ValueError
if the key is empty, or if the key contains a character which is not allowed in an object name.Raises a
KeyError
if the key violates a uniqueness constraint.The container might choose to add a different object than the one passed to this method.
If the object doesn’t implement IContained, then one of two things must be done:
- If the object implements ILocation, then the IContained interface must be declared for the object.
- Otherwise, a ContainedProxy is created for the object and stored.
The object’s __parent__ and __name__ attributes are set to the container and the given name.
If the old parent was
None
, then an IObjectAddedEvent is generated, otherwise, an IObjectMovedEvent is generated. An IContainerModifiedEvent is generated for the container.If the object replaces another object, then the old object is deleted before the new object is added, unless the container vetos the replacement by raising an exception.
If the object’s __parent__ and __name__ were already set to the container and the name, then no events are generated and no hooks. This allows advanced clients to take over event generation.
-
append
(self, value, notify=True)¶ Append given key number to container
-
get_visible_items
(self)¶ Get list of visible key numbers
-
-
interface
pyams_content.component.keynumber.interfaces.
IKeyNumberContainerTarget
[source]¶ Key numbers container target interface
-
interface
pyams_content.component.keynumber.interfaces.
IKeyNumberParagraph
[source]¶ Extends:
pyams_content.component.keynumber.interfaces.IKeyNumberContainerTarget
,pyams_content.component.paragraph.interfaces.IBaseParagraph
Key numbers paragraph interface
-
renderer
¶ Key numbers template
Presentation template used for key numbers
Implementation: zope.schema.Choice
Read Only: False Required: True Default Value: ‘default’
-