pyams_content.reference.pictograms package ⊞

class pyams_content.reference.pictograms.Pictogram[source]

Bases: pyams_content.reference.ReferenceInfo

Pictogram persistent class

alt_title

Accessibility title: Alternate title used to describe image content

header

pictogram-header: Default header associated with this pictogram

image

I18n property class used to handle files

class pyams_content.reference.pictograms.PictogramTable[source]

Bases: pyams_content.reference.ReferenceTable

Pictogram table

class pyams_content.reference.pictograms.PictogramsVocabulary(context=None)[source]

Bases: zope.schema.vocabulary.SimpleVocabulary

Pictograms vocabulary

pyams_content.reference.pictograms.handle_added_pictogram_table(event)[source]

Handle new pictogram table

pyams_content.reference.pictograms.interfaces

interface pyams_content.reference.pictograms.interfaces.IPictogram[source]

Extends: pyams_content.reference.interfaces.IReferenceInfo

Pictogram interface

Pictograms are managed in a specific reference table to be easily reused by the application into any shared content.

__parent__
Implementation:zope.schema.Field
Read Only:False
Required:True
Default Value:None
image

Image

Pictogram content

Implementation:pyams_i18n.schema.I18nImageField
Read Only:False
Required:True
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:pyams_file.schema.ImageField
Read Only:False
Required:False
Default Value:None
Allowed Type:bytes
alt_title

Accessibility title

Alternate title used to describe image content

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
header

pictogram-header

Default header associated with this pictogram

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.reference.pictograms.interfaces.IPictogramManager[source]

Pictogram manager interface

A pictogram manager (typically, a shared tool) is a component which allows selection of a set of pictogram which will be available for selection into shared content.

selected_pictograms

Selected pictograms

List of selected pictograms which will be available to shared contents

Implementation:zope.schema.List
Read Only:False
Required:False
Default Value:None
Allowed Type:list

Value Type

Implementation:zope.schema.Choice
Read Only:False
Required:True
Default Value:None
interface pyams_content.reference.pictograms.interfaces.IPictogramManagerTarget[source]

Extends: zope.annotation.interfaces.IAttributeAnnotatable

Pictogram manager target interface

interface pyams_content.reference.pictograms.interfaces.IPictogramTable[source]

Extends: pyams_content.reference.interfaces.IReferenceTable

Pictograms table 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:

  1. If the object implements ILocation, then the IContained interface must be declared for the object.
  2. 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.

pyams_content.reference.pictograms.manager

class pyams_content.reference.pictograms.manager.PictogramManager[source]

Bases: persistent.Persistent, zope.container.contained.Contained

Pictogram manager settings persistent class

selected_pictograms

Selected pictograms: List of selected pictograms which will be available to shared contents

class pyams_content.reference.pictograms.manager.SelectedPictogramsVocabulary(context=None)[source]

Bases: zope.schema.vocabulary.SimpleVocabulary

Selected pictograms vocabulary

pyams_content.reference.pictograms.manager.pictogram_manager_factory(target)[source]

Pictogram manager factory