Class luya\cms\menu\Item

Inheritanceluya\cms\menu\Item » yii\base\BaseObject
Implementsluya\web\LinkInterface, yii\base\Arrayable, yii\base\Configurable
Uses Traitsluya\web\LinkTrait, yii\base\ArrayableTrait
Available since version1.0.0
Source Code https://github.com/luyadev/luya-module-cms/blob/master/src/menu/Item.php

Menu item Object.

Each menu itaration will return in an Item-Object. The Item-Object contains several methods like returning title, url and ids or retrieve depending item iterations like parents or childs. As the Item Object extends the {{yii\base\BaseObject}} all getter methods can be access as property.

Read more in the [[app-menu.md]] Guide.

Public Properties

Hide inherited properties

Property Type Description Defined By
$alias string Returns the alias name of this page. luya\cms\menu\Item
$children luya\cms\menu\QueryIteratorFilter Get all children of the current item. luya\cms\menu\Item
$container string Returns the container name. luya\cms\menu\Item
$dateCreated integer Returns an unix timestamp when the page was created. luya\cms\menu\Item
$dateUpdated integer Returns an unix timestamp when the page was last time updated. luya\cms\menu\Item
$depth integer Returns the depth of the navigation tree start with 1. luya\cms\menu\Item
$descendants luya\cms\menu\QueryIteratorFilter Get all childrens with childrens children. luya\cms\menu\Item
$description string Returns the page description (used for making meta key description). luya\cms\menu\Item
$hasChildren boolean Check whether an item has childrens or not returning a boolean value. luya\cms\menu\Item
$hasParent boolean Check whether the parent has items or not. luya\cms\menu\Item
$href string Returns the href string which can be either with or without domain. luya\cms\menu\Item
$id integer Returns Unique identifier of item, represents data record of cms_nav_item table. luya\cms\menu\Item
$image luya\admin\image\Item|boolean The Image object or false if no image has been uploaded luya\cms\menu\Item
$is404Page boolean This property indicates whether the item is the 404 page item or not. luya\cms\menu\Item
$isActive boolean Returns a boolean value whether the current item is an active link or not, this is also for all parent elements. luya\cms\menu\Item
$isHidden boolean Returns boolean state of visbility. luya\cms\menu\Item
$isHome boolean Returns true if the item is the home item, otherwise false. luya\cms\menu\Item
$isStrictParsing boolean luya\cms\menu\Item
$itemArray array The item property containing the informations with key value parinings. luya\cms\menu\Item
$keywords array Returns an array of user defined keywords for this page (user to generate meta keywords) luya\cms\menu\Item
$lang string|null Can contain the language context, so the sub querys for this item will be the same language context as the parent object which created this object. luya\cms\menu\Item
$model luya\cms\models\Nav|boolean Returns the {{\luya\cms\models\Nav}} object for the current navigation item. luya\cms\menu\Item
$moduleName string Returns the name of the module if its of type module(2) luya\cms\menu\Item
$navId integer Returns the Navigation Id which is not unique but is used for the menu tree luya\cms\menu\Item
$nextSibling luya\cms\menu\Item|boolean Returns the next sibling based on the current sibling, if not found false is returned. luya\cms\menu\Item
$parent luya\cms\menu\Item Returns a Item-Object of the parent element, if no parent element exists returns false. luya\cms\menu\Item
$parentNavId integer Returns the parent navigation id of this item (0 = root level). luya\cms\menu\Item
$parents luya\cms\menu\QueryIteratorFilter Return all parent elements without the current item. luya\cms\menu\Item
$prevSibling luya\cms\menu\Item|boolean Returns the previous sibling based on the current sibling, if not found false is returned. luya\cms\menu\Item
$seoTitle string Returns the Alternative SEO-Title. luya\cms\menu\Item
$sibilings luya\cms\menu\QueryIteratorFilter Get all sibilings for the current item, this also includes the current item iteself. luya\cms\menu\Item
$siblings luya\cms\menu\QueryIteratorFilter An array with all item-object siblings luya\cms\menu\Item
$sortIndex integer Sort index position for the current siblings list. luya\cms\menu\Item
$target string Returns the target string value for the link resource. luya\cms\menu\Item
$teardown luya\cms\menu\QueryIteratorFilter Return all parent elemtns with the current item. luya\cms\menu\Item
$title string Returns the title of this page luya\cms\menu\Item
$type integer Returns the type of page 1=Page with blocks, 2=Module, 3=Redirect luya\cms\menu\Item
$userCreated luya\admin\models\User Returns an active record object for the admin user who created this page. luya\cms\menu\Item
$userUpdated luya\admin\models\User Returns an active record object for the admin user who last time updated this page. luya\cms\menu\Item

Public Methods

Hide inherited methods

Method Description Defined By
__call() Calls the named method which is not a class method. yii\base\BaseObject
__construct() Constructor. yii\base\BaseObject
__get() Returns the value of an object property. yii\base\BaseObject
__isset() Checks if a property is set, i.e. defined and not null. yii\base\BaseObject
__set() Sets value of an object property. yii\base\BaseObject
__toString() Return the href string from getHref() when echoing the object. luya\web\LinkTrait
__unset() Sets an object property to null. yii\base\BaseObject
canGetProperty() Returns a value indicating whether a property can be read. yii\base\BaseObject
canSetProperty() Returns a value indicating whether a property can be set. yii\base\BaseObject
className() Returns the fully qualified name of this class. yii\base\BaseObject
down() Go down to a given element which is evalutaed trough a callable. luya\cms\menu\Item
extraFields() Returns the list of fields that can be expanded further and returned by toArray(). yii\base\ArrayableTrait
fields() Returns the list of fields that should be returned by default by toArray() when no specific fields are specified. luya\cms\menu\Item
getAbsoluteLink() Returns the link with an absolute scheme. luya\cms\menu\Item
getAlias() Returns the current alias name of the item (identifier for the url) also (& previous) called rewrite. luya\cms\menu\Item
getChildren() Get all children of the current item. Children means going the depth/menulevel down e.g. from 1 to 2. luya\cms\menu\Item
getContainer() Return the current container name of this item. luya\cms\menu\Item
getDateCreated() Returns an unix timestamp when the page was created. luya\cms\menu\Item
getDateUpdated() Returns an unix timestamp when the page was last time updated. luya\cms\menu\Item
getDepth() Returns the depth of the navigation tree start with 1. Also known as menu level. luya\cms\menu\Item
getDescendants() Returns all children and childrens-children. luya\cms\menu\Item
getDescription() Returns the description provided by the cms admin, if any. luya\cms\menu\Item
getHasChildren() Check whether an item has childrens or not returning a boolean value. luya\cms\menu\Item
getHasParent() Check whether the parent has items or not. luya\cms\menu\Item
getHref() Get the href attribute value inside the Link tag. luya\cms\menu\Item
getId() Get the Id of the Item, the Id is an unique identifiere an represents the id column in the cms_nav_item table. luya\cms\menu\Item
getImage() Returns the image object if an object is uploaded. luya\cms\menu\Item
getIsActive() Returns a boolean value whether the current item is an active link or not, this is also for all parent elements. If a child item is active, the parent element is activ as well. luya\cms\menu\Item
getIsHidden() Whether the item is hidden or not if hidden items can be retreived (with/without settings). luya\cms\menu\Item
getIsHome() Whether current item is home or not. luya\cms\menu\Item
getIsStrictParsing() Returns whether the current page has strict parsing mode disabled or not. luya\cms\menu\Item
getKeywords() luya\cms\menu\Item
getLink() Returns the current item link relative path with composition (language). The path is always relativ to the host. luya\cms\menu\Item
getModel() Get the ActiveRecord Model for the current Nav Model. luya\cms\menu\Item
getModuleName() If the type of the item is equals 2 we can detect the module name and returns this information. luya\cms\menu\Item
getNavId() Get the Nav-id of the Item, the Nav-Id is not unique but in case of the language container the nav id is unique. The Nav-Id identifier repersents the id coluumn of the cms_nav table. luya\cms\menu\Item
getNextSibling() Get the next sibling in the current siblings list. luya\cms\menu\Item
getParent() Returns a Item-Object of the parent element, if no parent element exists returns false. luya\cms\menu\Item
getParentNavId() Get the parent_nav_id of the current item. If the current Item-Object belongs to a parent navigation item, the getParentNavId() method returns the getNavId() of the parent item. luya\cms\menu\Item
getParents() Return all parent elements without the current item. luya\cms\menu\Item
getPrevSibling() Get the previous sibling in the current siblings list. luya\cms\menu\Item
getProperty() Get Property Object. luya\cms\menu\Item
getPropertyValue() Get the value of a Property Object. luya\cms\menu\Item
getSeoTitle() Returns the Alternative SEO-Title. luya\cms\menu\Item
getSiblings() Get all sibilings for the current item, this also includes the current item iteself. luya\cms\menu\Item
getSortIndex() Get the sorting index position for the item on the current siblings. luya\cms\menu\Item
getTarget() Get the target attribute value inside the Link tag. luya\cms\menu\Item
getTeardown() Return all parent elements with the current item. luya\cms\menu\Item
getTitle() Returns the current Title of the Menu Item. luya\cms\menu\Item
getType() Return the current nav item type by number. luya\cms\menu\Item
getUserCreated() Returns an active record object for the admin user who created this page. luya\cms\menu\Item
getUserUpdated() Returns an active record object for the admin user who last time updated this page. luya\cms\menu\Item
hasMethod() Returns a value indicating whether a method is defined. yii\base\BaseObject
hasProperty() Returns a value indicating whether a property is defined. yii\base\BaseObject
init() Item-Object initiliazer, verify if the itemArray property is empty. luya\cms\menu\Item
setIsHidden() Override the default hidden state of an item. luya\cms\menu\Item
setModel() Setter method for the Model. luya\cms\menu\Item
setTarget() Setter method for the link target. luya\cms\menu\Item
setTitle() Override the current title of item. luya\cms\menu\Item
toArray() Converts the model into an array. yii\base\ArrayableTrait
with() You can use with() before the following methods: luya\cms\menu\Item
without() Unset a value from the with() method. luya\cms\menu\Item

Protected Methods

Hide inherited methods

Method Description Defined By
extractFieldsFor() Extract nested fields from a fields collection for a given root field Nested fields are separated with dots (.). e.g: "item.id" The previous example would extract "id". yii\base\ArrayableTrait
extractRootFields() Extracts the root field names from nested fields. yii\base\ArrayableTrait
getInternalDescendants() luya\cms\menu\Item
redirectMapData() Internal used to retriev redirect data. luya\cms\menu\Item
resolveFields() Determines which fields can be returned by toArray(). yii\base\ArrayableTrait

Property Details

Hide inherited properties

$alias public property

Returns the alias name of this page.

public string $alias null
$children public property

Get all children of the current item. Children means going the depth/menulevel down e.g. from 1 to 2.

$container public property

Returns the container name.

public string $container null
$dateCreated public property

Returns an unix timestamp when the page was created.

public integer $dateCreated null
$dateUpdated public property

Returns an unix timestamp when the page was last time updated.

public integer $dateUpdated null
$depth public property

Returns the depth of the navigation tree start with 1. Also known as menu level.

public integer $depth null
$descendants public property

Get all childrens with childrens children.

$description public property

Returns the page description (used for making meta key description).

public string $description null
$hasChildren public property

Check whether an item has childrens or not returning a boolean value.

public boolean $hasChildren null
$hasParent public property

Check whether the parent has items or not.

public boolean $hasParent null
$href public read-only property

Returns the href string which can be either with or without domain.

public string getHref ( )
$id public property

Returns Unique identifier of item, represents data record of cms_nav_item table.

public integer $id null
$image public read-only property (available since version 2.0.0)

The Image object or false if no image has been uploaded

$is404Page public property (available since version 2.0.0)

This property indicates whether the item is the 404 page item or not. This status is set by {{luya\cms\Menu::resolveCurrent()}} method and retrieved in the {{luya\cms\frontend\controllers\DefaultController::actionIndex()}} in order to send 404 response header.

public boolean $is404Page false
$isActive public property

Returns a boolean value whether the current item is an active link or not, this is also for all parent elements. If a child item is active, the parent element is activ as well.

public boolean $isActive null
$isHidden public property

Returns boolean state of visbility.

public boolean $isHidden null
$isHome public property

Returns true if the item is the home item, otherwise false.

public boolean $isHome null
$isStrictParsing public read-only property (available since version 2.1.0)
$itemArray public property

The item property containing the informations with key value parinings. This property will be assigned when creating the Item-Object.

public array $itemArray null
$keywords public property

Returns an array of user defined keywords for this page (user to generate meta keywords)

public array $keywords null
$lang public property

Can contain the language context, so the sub querys for this item will be the same language context as the parent object which created this object.

public string|null $lang null
$model public property

Returns the {{\luya\cms\models\Nav}} object for the current navigation item.

$moduleName public property

Returns the name of the module if its of type module(2)

public string $moduleName null
$navId public property

Returns the Navigation Id which is not unique but is used for the menu tree

public integer $navId null
$nextSibling public property

Returns the next sibling based on the current sibling, if not found false is returned.

$parent public property

Returns a Item-Object of the parent element, if no parent element exists returns false.

$parentNavId public property

Returns the parent navigation id of this item (0 = root level).

public integer $parentNavId null
$parents public property

Return all parent elements without the current item.

$prevSibling public property

Returns the previous sibling based on the current sibling, if not found false is returned.

$seoTitle public property

Returns the Alternative SEO-Title. If entry is empty, the $title will returned instead.

public string $seoTitle null
$sibilings public property

Get all sibilings for the current item, this also includes the current item iteself.

$siblings public read-only property

An array with all item-object siblings

$sortIndex public property

Sort index position for the current siblings list.

public integer $sortIndex null
$target public property

Returns the target string value for the link resource.

public string getTarget ( )
public void setTarget ( $target )
$teardown public property

Return all parent elemtns with the current item.

$title public property

Returns the title of this page

public string $title null
$type public property

Returns the type of page 1=Page with blocks, 2=Module, 3=Redirect

public integer $type null
$userCreated public property

Returns an active record object for the admin user who created this page.

$userUpdated public property

Returns an active record object for the admin user who last time updated this page.

Method Details

Hide inherited methods

__call() public method

Defined in: yii\base\BaseObject::__call()

Calls the named method which is not a class method.

Do not call this method directly as it is a PHP magic method that will be implicitly called when an unknown method is being invoked.

public mixed __call ( $name, $params )
$name string

The method name

$params array

Method parameters

return mixed

The method return value

throws yii\base\UnknownMethodException

when calling unknown method

                public function __call($name, $params)
{
    throw new UnknownMethodException('Calling unknown method: ' . get_class($this) . "::$name()");
}

            
__construct() public method

Defined in: yii\base\BaseObject::__construct()

Constructor.

The default implementation does two things:

  • Initializes the object with the given configuration $config.
  • Call init().

If this method is overridden in a child class, it is recommended that

  • the last parameter of the constructor is a configuration array, like $config here.
  • call the parent implementation at the end of the constructor.
public void __construct ( $config = [] )
$config array

Name-value pairs that will be used to initialize the object properties

                public function __construct($config = [])
{
    if (!empty($config)) {
        Yii::configure($this, $config);
    }
    $this->init();
}

            
__get() public method

Defined in: yii\base\BaseObject::__get()

Returns the value of an object property.

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing $value = $object->property;.

See also __set().

public mixed __get ( $name )
$name string

The property name

return mixed

The property value

throws yii\base\UnknownPropertyException

if the property is not defined

throws yii\base\InvalidCallException

if the property is write-only

                public function __get($name)
{
    $getter = 'get' . $name;
    if (method_exists($this, $getter)) {
        return $this->$getter();
    } elseif (method_exists($this, 'set' . $name)) {
        throw new InvalidCallException('Getting write-only property: ' . get_class($this) . '::' . $name);
    }
    throw new UnknownPropertyException('Getting unknown property: ' . get_class($this) . '::' . $name);
}

            
__isset() public method

Defined in: yii\base\BaseObject::__isset()

Checks if a property is set, i.e. defined and not null.

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing isset($object->property).

Note that if the property is not defined, false will be returned.

See also https://www.php.net/manual/en/function.isset.php.

public boolean __isset ( $name )
$name string

The property name or the event name

return boolean

Whether the named property is set (not null).

                public function __isset($name)
{
    $getter = 'get' . $name;
    if (method_exists($this, $getter)) {
        return $this->$getter() !== null;
    }
    return false;
}

            
__set() public method

Defined in: yii\base\BaseObject::__set()

Sets value of an object property.

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing $object->property = $value;.

See also __get().

public void __set ( $name, $value )
$name string

The property name or the event name

$value mixed

The property value

throws yii\base\UnknownPropertyException

if the property is not defined

throws yii\base\InvalidCallException

if the property is read-only

                public function __set($name, $value)
{
    $setter = 'set' . $name;
    if (method_exists($this, $setter)) {
        $this->$setter($value);
    } elseif (method_exists($this, 'get' . $name)) {
        throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name);
    } else {
        throw new UnknownPropertyException('Setting unknown property: ' . get_class($this) . '::' . $name);
    }
}

            
__toString() public method

Defined in: luya\web\LinkTrait::__toString()

Return the href string from getHref() when echoing the object.

public void __toString ( )

                public function __toString()
{
    return $this->getHref();
}

            
__unset() public method

Defined in: yii\base\BaseObject::__unset()

Sets an object property to null.

Do not call this method directly as it is a PHP magic method that will be implicitly called when executing unset($object->property).

Note that if the property is not defined, this method will do nothing. If the property is read-only, it will throw an exception.

See also https://www.php.net/manual/en/function.unset.php.

public void __unset ( $name )
$name string

The property name

throws yii\base\InvalidCallException

if the property is read only.

                public function __unset($name)
{
    $setter = 'set' . $name;
    if (method_exists($this, $setter)) {
        $this->$setter(null);
    } elseif (method_exists($this, 'get' . $name)) {
        throw new InvalidCallException('Unsetting read-only property: ' . get_class($this) . '::' . $name);
    }
}

            
canGetProperty() public method

Defined in: yii\base\BaseObject::canGetProperty()

Returns a value indicating whether a property can be read.

A property is readable if:

  • the class has a getter method associated with the specified name (in this case, property name is case-insensitive);
  • the class has a member variable with the specified name (when $checkVars is true);

See also canSetProperty().

public boolean canGetProperty ( $name, $checkVars true )
$name string

The property name

$checkVars boolean

Whether to treat member variables as properties

return boolean

Whether the property can be read

                public function canGetProperty($name, $checkVars = true)
{
    return method_exists($this, 'get' . $name) || $checkVars && property_exists($this, $name);
}

            
canSetProperty() public method

Defined in: yii\base\BaseObject::canSetProperty()

Returns a value indicating whether a property can be set.

A property is writable if:

  • the class has a setter method associated with the specified name (in this case, property name is case-insensitive);
  • the class has a member variable with the specified name (when $checkVars is true);

See also canGetProperty().

public boolean canSetProperty ( $name, $checkVars true )
$name string

The property name

$checkVars boolean

Whether to treat member variables as properties

return boolean

Whether the property can be written

                public function canSetProperty($name, $checkVars = true)
{
    return method_exists($this, 'set' . $name) || $checkVars && property_exists($this, $name);
}

            
className() public static method
Deprecated since 2.0.14. On PHP >=5.5, use ::class instead.

Defined in: yii\base\BaseObject::className()

Returns the fully qualified name of this class.

public static string className ( )
return string

The fully qualified name of this class.

                public static function className()
{
    return get_called_class();
}

            
down() public method (available since version 1.0.9)

Go down to a given element which is evalutaed trough a callable.

Iterate trough parent elements until the last.

$item = Yii::$app->menu->current->down(function(Item $item) {
    if ($item->depth == 1) {
        return $item;
    }
});
public luya\cms\menu\Item|mixed|boolean down ( callable $fn )
$fn callable

A function which holds the current iterated item.

return luya\cms\menu\Item|mixed|boolean

If no item has been picked, false is returned otherwise the picked item or any other callable response.

                public function down(callable $fn)
{
    $parent = $this->with($this->_with)->getParent();
    while ($parent) {
        $response = call_user_func_array($fn, [$parent]);
        if ($response) {
            return $response;
        }
        $parent = $parent->with($this->_with)->getParent();
    }
    return false;
}

            
extraFields() public method

Defined in: yii\base\ArrayableTrait::extraFields()

Returns the list of fields that can be expanded further and returned by toArray().

This method is similar to fields() except that the list of fields returned by this method are not returned by default by toArray(). Only when field names to be expanded are explicitly specified when calling toArray(), will their values be exported.

The default implementation returns an empty array.

You may override this method to return a list of expandable fields based on some context information (e.g. the current application user).

See also:

public array extraFields ( )
return array

The list of expandable field names or field definitions. Please refer to fields() on the format of the return value.

                public function extraFields()
{
    return [];
}

            
extractFieldsFor() protected method (available since version 2.0.14)

Defined in: yii\base\ArrayableTrait::extractFieldsFor()

Extract nested fields from a fields collection for a given root field Nested fields are separated with dots (.). e.g: "item.id" The previous example would extract "id".

protected array extractFieldsFor ( array $fields, $rootField )
$fields array

The fields requested for extraction

$rootField string

The root field for which we want to extract the nested fields

return array

Nested fields extracted for the given field

                protected function extractFieldsFor(array $fields, $rootField)
{
    $result = [];
    foreach ($fields as $field) {
        if (0 === strpos($field, "{$rootField}.")) {
            $result[] = preg_replace('/^' . preg_quote($rootField, '/') . '\./i', '', $field);
        }
    }
    return array_unique($result);
}

            
extractRootFields() protected method (available since version 2.0.14)

Defined in: yii\base\ArrayableTrait::extractRootFields()

Extracts the root field names from nested fields.

Nested fields are separated with dots (.). e.g: "item.id" The previous example would extract "item".

protected array extractRootFields ( array $fields )
$fields array

The fields requested for extraction

return array

Root fields extracted from the given nested fields

                protected function extractRootFields(array $fields)
{
    $result = [];
    foreach ($fields as $field) {
        $result[] = current(explode('.', $field, 2));
    }
    if (in_array('*', $result, true)) {
        $result = [];
    }
    return array_unique($result);
}

            
fields() public method

Returns the list of fields that should be returned by default by toArray() when no specific fields are specified.

A field is a named element in the returned array by toArray().

This method should return an array of field names or field definitions. If the former, the field name will be treated as an object property name whose value will be used as the field value. If the latter, the array key should be the field name while the array value should be the corresponding field definition which can be either an object property name or a PHP callable returning the corresponding field value. The signature of the callable should be:

function ($model, $field) {
    // return field value
}

For example, the following code declares four fields:

  • email: the field name is the same as the property name email;
  • firstName and lastName: the field names are firstName and lastName, and their values are obtained from the first_name and last_name properties;
  • fullName: the field name is fullName. Its value is obtained by concatenating first_name and last_name.
return [
    'email',
    'firstName' => 'first_name',
    'lastName' => 'last_name',
    'fullName' => function ($model) {
        return $model->first_name . ' ' . $model->last_name;
    },
];
public array fields ( )
return array

The list of field names or field definitions.

                public function fields()
{
    return ['href', 'target'];
}

            
getAbsoluteLink() public method

Returns the link with an absolute scheme.

The link with an absolute scheme path example https://luya.io/link where link is the output from the {{luya\cms\menu\item::getLink}} method.

public string getAbsoluteLink ( )
return string

The link path with prepand website host https://luya.io/home/about-us.

getAlias() public method

Returns the current alias name of the item (identifier for the url) also (& previous) called rewrite.

public string getAlias ( )
return string

E.g. "hello-word"

                public function getAlias()
{
    return $this->itemArray['alias'];
}

            
getChildren() public method

Get all children of the current item. Children means going the depth/menulevel down e.g. from 1 to 2.

public luya\cms\menu\QueryIteratorFilter getChildren ( )
return luya\cms\menu\QueryIteratorFilter

Returns all children

                public function getChildren()
{
    return (new Query())
        ->where(['parent_nav_id' => $this->navId, 'container' => $this->getContainer()])
        ->with($this->_with)
        ->lang($this->lang)
        ->all();
}

            
getContainer() public method

Return the current container name of this item.

public string getContainer ( )
return string

Return alias name of the container

                public function getContainer()
{
    return $this->itemArray['container'];
}

            
getDateCreated() public method

Returns an unix timestamp when the page was created.

public integer getDateCreated ( )
return integer

Unix timestamp

                public function getDateCreated()
{
    return $this->itemArray['timestamp_create'];
}

            
getDateUpdated() public method

Returns an unix timestamp when the page was last time updated.

public integer getDateUpdated ( )
return integer

Unix timestamp

                public function getDateUpdated()
{
    return $this->itemArray['timestamp_update'];
}

            
getDepth() public method

Returns the depth of the navigation tree start with 1. Also known as menu level.

public integer getDepth ( )

                public function getDepth()
{
    return $this->itemArray['depth'];
}

            
getDescendants() public method (available since version 3.1.0)

Returns all children and childrens-children.

public luya\cms\menu\QueryIteratorFilter getDescendants ( )

                public function getDescendants()
{
    return Query::createArrayIterator($this->getInternalDescendants(), $this->lang, array_flip($this->_with), false);
}

            
getDescription() public method

Returns the description provided by the cms admin, if any.

public string getDescription ( )
return string

The description string for this page.

                public function getDescription()
{
    return $this->itemArray['description'];
}

            
getHasChildren() public method

Check whether an item has childrens or not returning a boolean value.

public boolean getHasChildren ( )
return boolean

If there are childrens the method returns true, otherwhise false.

                public function getHasChildren()
{
    return count($this->getChildren()) > 0 ? true : false;
}

            
getHasParent() public method

Check whether the parent has items or not.

public boolean getHasParent ( )

                public function getHasParent()
{
    return (bool) $this->getParent();
}