eep is a command line tool to support developers using eZPublish.
To set the ezpublish instance used with eep and list some content classes for future modifications:
$ cd <ezpublish root folder>
$ eep use ezroot .
$ eep list contentclasses
To create a new content object and fill it with random data:
$ eep use contentclass <class identifier>
$ eep use contentnode <parent node id>
$ eep create content anObject
For help:
$ eep help
$ eep <module> help
$ eep help <module>
Shortcuts:
$ eep contentclass article
becomes $ eep cc article
at => attribute (module)
cc => contentclass (module)
co => contentobject (module)
cn => contentnode (module)
kb => knowledgebase (module)
ccg => contentclassgroup (module)
ats => attributes (method) e.g. eep list ats
ccs => contentclasses (method) e.g. eep list ccs
cos => contentobjects (method) e.g. eep list cos
cns => contentnodes (method) e.g. eep list cns
coid => contentobjectid (method) e.g. eep at coid
- attribute
- cache
- contentclass
- contentclassgroup
- contentnode
- contentobject
- create
- crondaemon
- ezfind
- ezflow
- help
- knowledgebase
- list
- section
- trash
- use
- user
- Extract to somewhere, like
$ /home/dfp/eep
- Make the controller executable
$ chmod +x eep.php
- Create a globally available link, like,
$ su
$ cd /usr/bin
$ ln -s -T /home/dfp/eep/eep.php eep
- edit eepSetting.php to update the path to the cache file to somewhere that is writable on your system, like
$ /var/tmp/
On linuxes you can set up bash completion (which is highly convenient) by:
$ sudo ln -s /home/dfp/eep/bash_completion/eep /etc/bash_completion.d/eep
Note that on CentOS, you might have to:
$ sudo yum install bash-completion
In order to insert the eep commandline completion script into the current bash session, you have to either $ . /etc/bash_completion
or start a new shell (like on CentOS).
- Create a bash completion directory and symlink it.
$ sudo mdkir /etc/bash_completion.d
$ sudo ln -s /your_path_to_eep/bash_completion/eep /etc/bash_completion.d/eep
- Then add the following to your
~/.bash_profile
,~/.bashrc
etc.
for f in /etc/bash_completion.d/*; do source $f; done
Any file in that location will now be sourced for bash use. 3. Start a new shell.
- See http://superuser.com/questions/288438/bash-completion-for-commands-in-mac-os
- Then create the symbolic link to
/your_path_to_eep/bash_completion/eep
in the installation specific completion folder. - Start a new shell
- Extract to somewhere, like
C:\wamp\scripts\eep
- Make the controller executable:
icacls C:\wamp\scripts\eep\eep.php /T /Q /C /RESET
- Create a globally available link by adding eep.php to the
PATH
variable
You can override the settings by copying .../eep/eepSettings.php
into your home folder and editing it. You may have to keep it uptodate with new versions, as these settings change.
The attribute module provides method to manipulate content object & content class attributes.
- delete
- newattributexml
- migrate
- update
- fromstring
- tostring
- setfield
- getfield
- set
- get
- info
- createalias
- contentobjectid
Deletes an attribute from a content class and it's content objects.
$ eep attribute delete <class identifier> <attribute identifier>
Displays XML that can be edited and used for import.
$ eep attribute newattributexml
Copies data from one content object attribute to another within a content class.
- Currently supported are
rot13
for testing andtime2integer
andtrim
anddate2ts
$ eep attribute migrate <class identifier> <src attribute> <conversion> <dest attribute>
Updates content class and content objects with new attribute; will resume after a partial update.
$ eep attribute update <class identifier> <path to newattributexml file>
Calls FromString() on the content object data_map's attribute.
$ eep attribute fromstring <content object id> <attribute identifier> <new value>
Calls ToString() on the content object data_map's attribute.
$ eep attribute tostring <content object id> <attribute identifier>
Directly sets one of the content class attribute fields (e.g. data_int
, data_text1
etc.)
$ eep attribute setfield <class identifier> <attributename> <fieldname> <fieldvalue>
Directly gets one of the content class attribute fields (e.g. data_int
, data_text1
etc.)
$ eep attribute getfield <class identifier> <attributename> <fieldname> <fieldvalue>
Directly sets one of the contentobject attributes (e.g. owner_id, published etc.)
$ eep attribute set <content object id> <attribute identifier> <attribute value>
Directly gets one of the contentobject attributes (e.g. owner_id, published etc.)
$ eep attribute get <content object id> <attribute identifier> <attribute value>
Displays all content class attribute fields (e.g. data_int
, data_text1
etc.)
$ eep attribute info <class identifier> <attributename> <fieldname>
Create a given alias manually for a given content object image attribute.
$ eep attribute createalias <content object id> <attribute identifier> <alias name>
Returns the contentobject id from a contentobject attribute id.
eep attribute contentobjectid <content object _attribute_ id> [<version>]
Tip
Amongst other things this method can be used to find out which content object images in the /var/<yoursite>/storage/
folder belong to.
The image path contains folders in the following format:
<contentobject_id>-<contentobject_version>-<contentobject_language>
i.e. 23929-1-eng-CA
for the 1st version of a content object for english (Canada)
Those IDs could be extracted via grep
and then passed to eep attribute contentobjectid ...
via xargs
.
The cache module provides methods to work with ez cache.
Clears legacy cache in a safe way, basically clear everything that can be cleared safely.
$ eep cache cacheclear
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>
```# Modules - contentclassgroup
> The contentclassgroup module provides methods to manipulate content class groups.
- [creategroup](#creategroup)
- [deletegroup](#deletegroup)
- [renamegroup](#renamegroup)
- [fetchall](#fetchall)
## creategroup
Creates a new content class group.
```sh
$ eep use ezroot <path>
$ eep contentclassgroup creategroup <group identifier>
Deletes the specified content class group
$ eep use ezroot <path>
$ eep contentclassgroup deletegroup <group identifier>
Renames a content class group.
$ eep use ezroot <path>
$ eep contentclassgroup renamegroup <group identifier from> <group identifier to>
Displays all content class groups.
$ eep use ezroot <path>
$ eep contentclassgroup fetchall
The contentnode module provides methods to manipulate content nodes.
- clearsubtreecache
- contentobject
- dump
- info
- location
- find
- [find_by_attribute] not implemented searchForNodes_byAttribute()
- deletesubtree
- move
- setsortorder
Clears the content object cache for items in a subtree (if required).
$ eep clearsubtreecache <node id>
Converts a content node id to a content object id.
$ eep use ezroot <path>
$ eep contentnode contentobject <content node id>
or
$ eep use ezroot <path>
$ eep use contentnode <content node id>
$ eep contentnode contentobject
Dump all the data associated with a content node into an XML structure; suitable for dumping an eZ Publish instance for import into some other system, or etc.
$ eep contentnode dump <node id>
Displays content node information.
$ eep use ezroot <path>
$ eep use contentnode <node id>
$ eep contentnode info
or
$ eep use ezroot <path>
$ eep contentnode info <node id>
Creates a content object at an additional location.
$ eep use ezroot <path>
$ eep use contentobject <object id>
$ eep contentnode location <new parent node id>
Finds a node of a given content class by parent node id.
- supports
--limit=N
and/or--offset=M
$ eep use ezroot <path>
$ eep cn find <content class> <parent node id> <search string>
Deletes a subtree of nodes.
- is hardcoded to use
user 14 (admin)
to do the deletions - supports
--limit=N
to override the sanity check limit (0 means no-limit)
$ eep use ezroot <path>
$ eep contentnode deletesubtree <subtree node id>
or
$ eep use contentnode <subtree node id>
$ eep contentnode deletesubtree
Moves a node to be a child at the new location.
$ eep use ezroot <path>
$ eep use contentnode <node id>
$ eep contentnode move <new parent node id>
or
$ eep contentnode move <node id> <new parent node id>
Sets the sort order for children of a node.
(You may have to republish the object to make the change visible.)
The available orderings are:
- PATH
- PUBLISHED
- MODIFIED
- SECTION
- DEPTH
- CLASS_IDENTIFIER
- CLASS_NAME
- PRIORITY
- NAME
- MODIFIED_SUBNODE
- NODE_ID
- CONTENTOBJECT_ID
The available directions are:
- DESC
- ASC
$ eep contentnode setsortorder <node id> <sort ordering> <sort direction>
The contentobject module provides methods to manipulate content objects.
- attributematch
- clearcache
- info
- datamap
- delete
- dump x-ref:
eep contentnode dump
- related
- reverserelated
- contentnode
- republish
- sitemapxml
- deleteversions
- fetchbyremoteid
- translationcreate
- translationsetmain
- translationremove
- stateassignbyid
- stateassignbyidentifier
- stateview
Get list of objects matching the content class and a match on the attribute value.
$ eep contentobject attributematch <content class identifier> <attribute identifier> <search value>
Clears the content cache for given content object.
$ eep use ezroot <path>
$ eep use contentobject <object id>
$ eep contentobject clearcache
or
$ eep contentobject clearcache <object id>
Displays some information about a content object.
$ eep use ezroot <path>
$ eep use contentobject <object id>
$ eep contentobject info
or
$ eep contentobject info <object id>
Displays most of the content object datamap.
$ eep use ezroot <path>
$ eep use contentobject <object id>
$ eep contentobject datamap
or
$ eep contentobject datamap <object id>
Deletes a content object and it's children.
$ eep use ezroot <path>
$ eep use contentobject <object id>
$ eep contentobject delete
or
$ eep contentobject delete <object id>
Dump all content data, suitable for export from ez. See "eep contentnode dump".
Displays a list of related content objects.
- supports use of
--limit=N
and--offset=M
$ eep use ezroot <path>
$ eep use contentobject <object id>
$ eep contentobject related
or
$ eep contentobject related <object id>
Displays a list of reverse related content objects.
- supports use of
--limit=N
and--offset=M
$ eep use ezroot <path>
$ eep use contentobject <object id>
$ eep contentobject reverserelated
or
$ eep contentobject reverserelated <object id>
Converts a content object id into a content node id.
$ eep use ezroot <path>
$ eep contentobject contentnode <content object id>
or
$ eep use ezroot <path>
$ eep use contentobject <content object id>
$ eep contentobject contentnode
Republishes a content object.
$ eep use ezroot <path>
$ eep use contentobject <object id>
$ eep contentobject republish
or
$ eep contentobject republish <object id>
Displays a line of XML for inclusion in a sitemap.
- Note domain is only:
example.com
- Note
<change frequency>
is one of:always
hourly
daily
weekly
monthly
yearly
never
- Note that the sitemap header is:
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
- the matching close is:
</urlset>
$ eep contentobject sitemapxml <object id> <domain> [<change frequency> [<priority>]]
Deletes all the archived versions of a content object.
$ eep contentobject deleteversions <object id>
Fetches a content object by remote id.
$ eep use ezroot <path>
$ eep contentobject fetchbyremoteid <remoteid>
Adds a new translation for the content object, optionally copies the translation from an existing one
- Note that 'locale's are, eg., eng-GB or eng-US
$ eep contentobject translationcreate <object id> <new locale> [<existing locale>]
Sets the main translation, eg. in preparation to removing eng-GB as a supported translation
$ eep contentobject translationsetmain <object id> <locale>
Removes a translation from the content object
$ eep contentobject translationremove <object id> <locale>
Assigns an object state by state id
eep contentobject stateassignbyid <object id> <state id>
Assigns an object state by state/group identifier e.g. ez_lock/locked eZ Publish ships with one state group with two states by default
- ez_lock/locked
- ez_lock/not_locked
All state groups and states can be found in the admin interface: Setup > States
eep contentobject stateassignbyidentifier <object id> <state/group identifier>
Displays object state information
eep contentobject stateview <object id>
The create module provides methods to create content objects.
given parent node.```
- [content](#content)
- [quick](#quick)
## content
Creates content object and fills it with random data.
_Example_:
```sh
for i in {1..10}; do /usr/bin/eep create content random; echo \$i; done
$ eep use ezroot <path>
$ eep use contentclass <class identifier>
$ eep use contentnode <parent node id>
$ eep create content random
Creates an empty content object, returns object id and node id so that the object can be populated.
The output is, e.g.:
new object id 315
new node id 312
$ eep create quick <parent node id> <class identifier>
The crondaemon module ...
Adds a cron task.
- Priority is
1
to999
,999
is the highest
$ eep crondaemon addtask <task type> <task> <priority = 500>
The ezfind module provides methods to manipulate and query eZFind's Solr index.
- advanced
- indexobject
- indexnode
- isobjectindexed
- eject
- ejectbydocid
- fields
- lastindexed
- startsolr
- testquery
Queries the Solr index.
- Using
--output
requires the relevant queryResponseWriter to be enabled inezfind/java/solr/conf/solrconfig.xml
$ eep ezfind advanced <statement> <fields to return> <filter> [--offset=## --limit=## --show-complex=1 --output=xml|csv|json]
Example:
$ eep ezfind advanced 'Water*' 'meta_node_id_si,attr_title_s' 'meta_class_identifier_ms:article' --show-complex=1 --output=json
Adds a content object's data to the Solr index; by content object id.
$ eep ezfind indexobject <object id>
Adds a content object's data to the Solr index; by content node id.
$ eep ezfind indexnode <node id>
Checks if a content object is part of the Solr index.
$ eep ezfind isobjectindexed <object id>
Removes a content object's data from the Solr index.
$ eep ezfind eject <object id>
Removes a document from the Solr index using the document id (meta_guid_ms)
$ eep ezfind ejectbydocid <document id> <language code>
<document id>
in stored as meta_guid_ms
<language code>
is the language locale e.g. eng-CA and is optional unless UseMultiLanguageCores is enabled.
Displays the given content objects fields in the Solr index.
$ eep ezfind fields <object id>
Displays when the content object was last indexed.
$ eep ezfind lastindexed <object id>
Checks if Solr is running; and starts it if it isn't.
$ eep use ezroot .
$ eep ezfind startsolr
Runs a test query and var_dumps() results.
$ eep use ezroot .
$ eep ezfind testquery
The ezflow module provides methods to find ezflow content classes and display information about ezflow blocks and block nodes.
Returns content classes using the ezpage attribute.
OR
Returns content objects using a specific block type.
$ eep ezflow find ezpage
or
$ eep ezflow find blocktype <block_type>
Lists all ezflow block types in use.
$ eep ezflow list blocktypes [grouped]
The help module display module specific help.
Displays module specific help.
$ eep help
or
$ eep <module> help
or
$ eep help <module>
The knowledgebase module provides various helper methods.
Displays useful INI settings to set up for debugging.
$ eep knowledgebase ezdebug
Displays a useful apache virtual host file.
$ eep knowledgebase vhost
Displays some SQL that will convert all the UK translations of content classes to US translations.
$ eep knowledgebase sqltofixenglish
The list module provides methods to display information for eZPublish content and settings.
- allattributes
- allinifiles
- attributes
- children
- contentclasses
- extensions
- links
- siteaccesses
- subtree
- subtreeordered
Lists all attributes present in the system.
$ eep use ezroot <path>
$ eep list allattributes
Lists all INI files.
$ eep use ezroot <path>
$ eep list inifiles
Lists attributes of a content class.
$ eep use ezroot <path>
$ eep use contentclass <class identifier>
$ eep list attributes
or
$ eep list attributes <class identifier>
Lists children of a node.
- supports
--limit=N
and/or--offset=M
$ eep use ezroot <path>
$ eep use contentnode <node id>
$ eep list children [--offset=<N>] [--limit=<M>]
or
$ eep list children <node id> [--offset=<N>] [--limit=<M>]
Lists all extensions.
$ eep use ezroot <path>
$ eep list extensions
List all ez links, so to review all the outbound links on the site. The output is CSV and can take quite a while to generate since it pings all destinations.
eep use ezroot <path>
eep list links <public domain and protocol> <admin domain and protocol> <node view path>
where:
<public domain and protocol> is for the public side, eg http://foo.com
<admin domain and protocol> eg, https://admin.foo.com
<node view path> eg, /manage/content/view/full/
Lists all content classes.
$ eep use ezroot <path>
$ eep list contentclasses
Lists all siteaccesses.
$ eep use ezroot <path>
$ eep list siteaccesses
Lists all nodes in a subtree.
- supports
--limit=N
--offset=M
$ eep use ezroot <path>
$ eep use contentnode <node id>
$ eep list subtree
or
$ eep list subtree <node id>
Lists all nodes in a subtree; with additional options
- like "list subtree" but works on more nodes; can order results in depthfirst(postorder) or breadthfirst order
- supports
--order=<[depthfirst|breadthfirst]>
--limit=N
--offset=M
and--truncate=P
$ eep use ezroot <path>
$ eep use contentnode <node id>
$ eep list subtreeordered
or
$ eep list subtreeordered <node id>
The section module provides methods to display section information.
List all sections.
$ eep section list
Lists all content objects in the section.
- supports
--limit=N
and/or--offset=M
$ eep section allobjects <section id>
- assign section to subtree
$ eep section <section id> <node id>
The trash module provides methods to display information about content objects in the trash.
Displays count of all content objects in the trash.
$ eep trash list
Lists all content objects in the trash.
$ eep trash list
The use module provides methods to interact with the eep cache.
Saves values for use with other commands. The 'commands' are the keys.
Note that "ezroot" is required when you are going to interact with eZ Publish.
Adds a key/value pair to the cache.
$ eep use <key> <desired value>
Prints the current cached values.
$ eep use dump
The user module provides methods to retrieve user information not accessible through the content object or content node modules.
Dump list of users who have edited content in the last N months (defaults to 3) and who have edited more than 1 piece of content.
$ eep user editlog [<number of months>]
Returns user visit information e.g. last login, login count
$ eep user visit <user_id>
Adds a subtree notification
eep user addsubtreenotification <user_id> <node_id>
Removes a subtree notification
eep user removesubtreenotification <user_id> <node_id>
Lists user's subtree notifications
eep user listsubtreenotifications <user_id>
A collection of static attribute related helper functions.
- updateAttribute
- addAttributeToClass
- updateParameters
- updateContentObjectAttributes
- deleteAttribute
- listAttributes
- fromString
- toString
- createAlias
- setField
- getField
- set
- get
- info
- contentobjectid
Updates an attribute for an existing content class. If the attribute doesn't exist it will be created via
AttributeFunctions::addAttributeToClass
. All content class objects will be updated.
If the attribute does exist all content class objects will be updated only e.g. repairing in case an update via the admin UI timed out pre-maturely.
Currently supported datatypes: ezstring ezobjectrelationlist ezinteger ezselection ezxmltext ezimage eztags
(and probably others)
Parameters:
$classIdentifier
String$newAttributeXPath
new attribute XML (see example below)
$newAttributeXPath
is expected to use the pre-defined $newAttributeXML
format. (Available as public static and set in the constructor)
<?xml version="1.0" encoding="UTF-8"?>
<newattribute>
<identifier>
the_identifier
</identifier>
<displayname>
Display Name
</displayname>
<description>
This is the description of this attribute. You can say anything you like.
</description>
<!-- supported: ezstring ezobjectrelationlist ezinteger ezselection ezxmltext ezimage eztags and probably others -->
<!-- see content.ini for full list of avilable types -->
<datatypestring>ezxmltext</datatypestring>
<!-- some examples: eng-GB eng-CA eng-US -->
<language>eng-CA</language>
<is_required>0</is_required>
<is_searchable>1</is_searchable>
<is_information_collector>0</is_information_collector>
<can_translate>0</can_translate>
<!-- "eep-no-content" is recognized to mean "no content" -->
<content>eep-no-content</content>
<additional_for_specific_datatype>
<ezselection>
<is_multi_select>
0
</is_multi_select>
<options>
<option>Class</option>
<option>Order</option>
<option>Family</option>
<option>Subfamily</option>
<option>Genus</option>
<option>Species</option>
<option>IncertaeSedis</option>
</options>
</ezselection>
<ezstring>
<!-- maxstringlength is capped at 255 by a sanity check in the code -->
<maxstringlength>255</maxstringlength>
</ezstring>
<ezxmltext>
<!-- numberoflines is capped at 30 by a sanity check in the code -->
<numberoflines>10</numberoflines>
</ezxmltext>
<ezboolean>
<default_value>eep-no-content</default_value>
</ezboolean>
<ezobjectrelation>
<selection_type>
0
</selection_type>
<fuzzy_match>
false
</fuzzy_match>
<!-- node id, url path, or "eep-no-content" -->
<default_selection_node>
eep-no-content
</default_selection_node>
</ezobjectrelation>
<eztags>
<subtree>0</subtree>
<hideroot>1</hideroot>
<dropdown>0</dropdown>
<maxtags>0</maxtags>
</eztags>
<!-- not fully supported
<ezmatrix>
<default_row_count>
3
</default_row_count>
</ezmatrix>
-->
</additional_for_specific_datatype>
</newattribute>
Adds a new attribute to an existing content class.
Parameters:
$contentClass
eZContentClass object$newAttributeXPath
new attribute XML (see example above)
Note: $contentClass
is the result of eZContentClass::fetchByIdentifier( $classIdentifier );
Returns:
- The new contentClassAttributeId; Integer
Updates optional attribute parameters like selection_type for objectrelations.
Parameters:
$classAttribute
eZContentClassAttribute object$newAttributeXPath
new attribute XML (see example above)
Update all the objects with the new attribute info.
Parameters:
$contentClass
eZContentClass object$classAttributeID
Integer$identifier
Boolean; default = false
Deletes an attribute from a content class.
Parameters:
$classIdentifier
String$attributeIdentifier
String
Lists all content class attributes (table output)
Parameters:
$classIdentifier
String
Updates a content object data_map attribute value.
Parameters:
$contentObjectId
Integer$attributeIdentifier
String$value
Mixed
Note:
each data type has different input string format requirements, consult the link below for details.
Also note:
not all datatypes (attribute types) are supported. The most commonly used ones are, such as 'plain text', integer, eZXML, and others as supported by the mapping of complex data into strings, as noted above.
Returns string representation of a content object data_map attribute value.
Parameters:
$contentObjectId
Integer$attributeIdentifier
String
Directly sets one of the content class attribute fields (e.g. data_int, data_text1 etc.)
$classIdentifier
Integer$attributeIdentifier
String$fieldIdentifier
String$fieldValue
String
Directly gets one of the content class attribute fields (e.g. data_int, data_text1 etc.)
$classIdentifier
Integer$attributeIdentifier
String$fieldIdentifier
String
Directly sets one of the contentobject attributes (e.g. owner_id, published etc.)
$contentObjectId
Integer$attributeIdentifier
String$attributeValue
Mixed
Directly gets one of the contentobject attributes (e.g. owner_id, published etc.)
$contentObjectId
Integer$attributeIdentifier
String
Creates and image alias for a given content object attribute.
Parameters:
$contentObjectId
Integer$attributeIdentifier
String$aliasName
String
Returns the contentobject id from a contentobject attribute id.
Parameters:
$contentObjectAttributeId
Integer$version
Integer; Default = 1
Returns:
- Integer
A collection of methods to read, write and check the eep cache.
Note:
The eep cache is stored in a file specified in the user settings eepSetting::DataCacheFile
.
Returns an eepCache instance.
Writes (adds/updates) a value to the eepCache using the key provided. An empty value removes the cache entry.
Parameters:
$key
String$value
String
Reads a value from the eepCache using the key provided.
Parameters:
$key
String
Returns the entire eep cache.
Returns if the given key exists in the eep cache.
Parameters:
$key
String
A collection of core helper methods.
- printTable
- getListOfAliases
- expandAliases
- fastRelatedObjectCount
- displayNodeList
- displayNonObjectList
- displayObjectList
- extractAdditionalParams
- republishObject
- convertTimeToInteger
- fixXML
- fixBadQuestionMarks
Outputs data in a formatted ASCII table
Parameters:
$table
table data, with the first row listing the column headers; Array$description
an optional table description; String
$table = array
(
[0] => array
(
'OID'
, 'NID'
, 'Title'
),
[1] => array
(
12345
, 12346
, 'Lorem Ipsum'
)
// etc ...
);
eep::printTable( $table, "A dummy description" );
+--------+---------+--------------+
I A dummy description |
+--------+---------+--------------+
I OID | NID | Title |
+--------+---------+--------------+
| 12345 | 12346 | Lorem Ipsum |
...
Returns an array of all module aliases
Returns the expanded version of the module name, e.g. cc => contentclass
Parameters:
$alias
the alias to expand; String
Returns:
- The expanded alias or the original
$alias
value if the alias is not found; String
Returns the (reverse)related object count for a given content object id.
Parameters:
$objectId
Integer$objectVersion
Integer$attributeID
Integer; Optional; Default = 0$reverseRelatedObjects
Boolean; Optional; Default = false$params
Boolean; Optional; Default = false
Returns:
- Integer
Outputs an formatted ASCII table of node information, from a list of nodes.
Parameters:
$list
Array of eZContentObjectTreeNode(s)$title
String
Outputs an formatted ASCII table of node information, from a list of 'non-objects'.
Note:
A non-object is the array of data that you get when you fetch an object but say that you don't actually want the object.
Parameters:
$list
Array of eZContentObjectTreeNode(s)$title
String
Outputs an formatted ASCII table of node information, from a list of content objects.
$list
Array of eZContentObject(s)$title
String
Returns key value pairs based on any params to the command line that match: --key=value
Parameters:
&$args
Array
Re-publishes a content object.
Note:
This protects against accidentally operating on an object with no main node, i.e. an object that is in the trash
Parameters:
$objectId
Integer
Converts time string to number of seconds.
Parameters:
$time
String; hh:mm:ss
Returns:
- Integer
Cleans many common forms of XML corruption, and ultimately forces character encoding.
Note:
This method can render some remaining characters as question marks, but many of those can be fixed too, see fixBadQuestionMarks.
Parameters:
$xml
XML String
Returns:
- XML String
Fixes 'bad' question marks that have been been introduced by forcing the encoding to utf8 (e.g. via fixXML).
Parameters:
$xml
XML String
Returns:
- XML String
A logging class based on "eZLog class" - see /lib/ezfile/classes/ezlog.php.
Note:
eepLog methods are not static.
Public
Private
Constructor method
Parameters:
$path
String$file
String
$eepLogger = new eepLog( eepSetting::LogFolder, eepSetting::LogFile );
Outputs log message with severity.
Parameters:
$msg
String$severity
String; (normal|error|shy|exception|bell|fatal); Default = normal
Note:
- severity
exception
will throw an exception - severity
fatal
will die
Sets the log file path.
Parameters:
$path
String
Sets the log file name.
Parameters:
$file
String
Set the maximum amount of rotation log files before deletion occurs.
Parameters:
$maxLogRotateFiles
Integer
Set the maximum log file size.
Parameters:
setMaxLogFileSize
Integer; (in bytes)
Private
Writes the log message to the log file. Triggers log rotation as required.
Parameters:
$message
String
Private
Handles log file rotation and cleanup.
Parameters:
$fileName
String
Return:
- Boolean
A collection of validation methods.
Check if an ID is a valid content object ID.
Parameters:
$id
Integer
Returns:
- Boolean
Check if an ID is a valid content node ID.
Parameters:
$id
Integer
Returns:
- Boolean
Still to come ...
Still to come ...
Still to come ...