The contentclass module provides methods to manipulate content classes.
- appendtogroup
- createclass
- deleteclass
- fetchallinstances
- info
- listattributes
- removefromgroup
- setclassobjectidentifier
- setfield
- setiscontainer
- translationcreate
- translationsetmain
- translationremove
Append the content class to the content class group. Note, a class can exist in more than one group.
$ eep contentclass appendtogroup <content class identifier> <group identifier>
Creates a stub content class with an automatic content class identifier and default string for object-naming; uses the "admin" user to create the class; returns the class identifier so that attributes can then be added and the default naming be updated.
$ eep createclass <display name> <content class group identifier>
Deletes all the instances of a class, and then deletes the class itself.
$ eep use ezroot <path>
$ eep use contentclass <class identifier>
$ eep contentclass deleteclass
or
$ eep use ezroot <path>
$ eep contentclass deleteclass <class identifier>
Fetches all instances of a contentclass. Note that this supports limit and offset parameters.
$ eep use ezroot <path>
$ eep use contentclass <class identifier>
$ eep contentclass fetchallinstances
or
$ eep contentclass fetchallinstances <content class identifier> [--limit=nnn] [--offset=nnn]
Dumps the internal fields and values that ez uses to specify a content class. These can be edited with eep setfield.
$ dumps the internal fields that ez manages for the content class, like 'url pattern' and etc.
Lists all class attributes.
$ eep use ezroot <path>
$ eep use contentclass <class identifier>
$ eep contentclass listattributes
Removes a contentclass from a contentclass group.
$ eep use ezroot <path>
$ eep contentclass removefromgroup <content class identifier> <group identifier>
Sets the string used to name instances of the class, uses the same syntax as in the admin UI.
$ eep contentclass setclassobjectidentifier <class identifier> <object naming string or pattern>
Set any of the internal fields that ez manages for the content class, see eep info for the list of fields and values.
$ eep contentclass setfield <content class identifier> <field name> <new value>
Sets or unsets the 'is container' flag on the class.
$ eep contentclass setiscontainer <class identifier> <0|1>
Add a new translation for the content class, optionally copy the translation from an existing one. Note that 'locale's are, eg., eng-GB or eng-US
$ eep contentclass translationcreate <class identifier> <new locale> [<existing locale>]
Set the main translation, eg. in preparation to removing eng-GB as a supported translation.
$ eep contentclass translationsetmain <class identifier> <locale>
Remove a translation from the content class.
$ eep contentclass translationremove <class identifier> <locale>