pyams_content.reference
package ⊞¶
-
class
pyams_content.reference.
ReferenceInfo
[source]¶ Bases:
persistent.Persistent
,zope.container.contained.Contained
Reference record
-
short_name
¶ Short name: Short name used in breadcrumbs
-
title
¶ Title: Visible label used to display content
-
-
class
pyams_content.reference.
ReferenceTable
[source]¶ Bases:
zope.container.folder.Folder
References table
-
languages
¶ Proposed languages: List of languages available for this content
-
short_name
¶ Short name: Short name used in breadcrumbs
-
title
¶ Title: Visible label used to display content
-
-
class
pyams_content.reference.
ReferencesManager
[source]¶ Bases:
zope.container.folder.Folder
References tables container
-
short_name
¶ Short name: Short name used in breadcrumbs
-
title
¶ Title: Visible label used to display content
-
-
pyams_content.reference.
handle_added_references_manager
(event)[source]¶ Handle new references manager
Subpackages¶
pyams_content.reference.interfaces
¶
-
interface
pyams_content.reference.interfaces.
IReferenceInfo
[source]¶ Extends:
pyams_content.interfaces.IBaseContent
Base reference interface
-
__parent__
¶ Implementation: zope.schema.Field
Read Only: False Required: True Default Value: None
-
-
interface
pyams_content.reference.interfaces.
IReferenceManager
[source]¶ Extends:
pyams_content.interfaces.IBaseContent
,zope.container.interfaces.IContainer
References tables container
-
__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.
-
-
interface
pyams_content.reference.interfaces.
IReferenceTable
[source]¶ Extends:
pyams_content.interfaces.IBaseContent
Reference table interface
-
__parent__
¶ Implementation: zope.schema.Field
Read Only: False Required: True Default Value: None
-
__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.
-