eZ Publish  [trunk]
eZPathElement Class Reference

Handles singular path elements in URL aliases. More...

+ Inheritance diagram for eZPathElement:
+ Collaboration diagram for eZPathElement:

List of all members.

Public Member Functions

 actionURL ()
 alwaysAvailable ()
 eZPathElement ($row)
 getLanguage ()
 getPath ()
 getPathArray ()
 removeThis ()
 store ($fieldFilters=null)

Static Public Member Functions

static definition ()
 Returns the definition for the object, the default implementation is to return an empty array.
static fetchNamedByParentID ($parentID, $name)

Public Attributes

 $AlwaysAvailable

Detailed Description

Handles singular path elements in URL aliases.

This class is similar to eZURLAliasML but is designed to work on single path elements instead of considering the whole url.

The definition() of this class is the same as eZURLAliasML but it is not possible to store and remove items of this class.

Definition at line 22 of file ezpathelement.php.


Member Function Documentation

Converts the action property into a real url which responds to the module/view on the site.

Definition at line 125 of file ezpathelement.php.

Definition at line 208 of file ezpathelement.php.

static eZPathElement::definition ( ) [static]

Returns the definition for the object, the default implementation is to return an empty array.

It's upto each inheriting class to return a proper definition array.

The definition array is an associative array consists of these keys:

  • fields: an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
  • keys: an array of fields which is used for uniquely identifying the object in the table.
  • function_attributes: an associative array of attributes which maps to member functions, used for fetching data with functions.
  • set_functions: an associative array of attributes which maps to member functions, used for setting data with functions.
  • increment_key: the field which is incremented on table inserts.
  • class_name: the classname which is used for instantiating new objecs when fetching from the database.
  • sort: an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either 'asc' or 'desc'.
  • name: the name of the database table

Example: public static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }

Returns:
array

Reimplemented from eZPersistentObject.

Definition at line 38 of file ezpathelement.php.

Initializes a new path element.

Definition at line 27 of file ezpathelement.php.

Referenced by getPathArray().

static eZPathElement::fetchNamedByParentID ( parentID,
name 
) [static]

Fetches path elements which has the parent $parentID and name $name.

Returns:
An array of path element objects.

Definition at line 134 of file ezpathelement.php.

Returns the eZContentLanguage object which maches the element language mask.

Definition at line 116 of file ezpathelement.php.

Calculates the full path for the current item and returns it.

Note:
If you know the action values of the path use fetchPathByActionList() instead, it is more optimized.
The calculated path is cached in $Path.

Definition at line 149 of file ezpathelement.php.

Definition at line 178 of file ezpathelement.php.

Removal of path elements is not allowed.

Definition at line 107 of file ezpathelement.php.

eZPathElement::store ( fieldFilters = null)

Storing of path elements is not allowed.

Reimplemented from eZPersistentObject.

Definition at line 98 of file ezpathelement.php.


Member Data Documentation

eZPathElement::$AlwaysAvailable

Definition at line 213 of file ezpathelement.php.


The documentation for this class was generated from the following file: