NavItem
class NavItem (View source)
An object used by the Autonav Block to display navigation items in a tree.
Properties
bool|int | $hasChildren | ||
int|null | $cID | ||
string|null | $cPath | ||
string|null | $cPointerExternalLink | ||
string|null | $cPointerExternalLinkNewWindow | ||
string|null | $cvDescription | ||
string|null | $cvName | ||
protected int | $level | ||
protected bool | $isActive | ||
protected Page | $_c |
Methods
Instantiates an Autonav Block Item.
Returns the number of children below this current nav item.
Returns the description of the current navigation item (typically grabbed from the page's short description field).
Returns a target for the nav item.
Gets a URL that will take the user to this particular page. Checks against concrete.seo.url_rewriting, the page's path, etc.
Gets the name of the page or link.
Gets the pageID for the navigation item.
Gets the current level at the nav tree that we're at.
Sets the collection Object of the navigation item to the passed object.
Gets the collection Object of the navigation item.
Details
void
__construct(array $itemInfo, int $level = 1)
Instantiates an Autonav Block Item.
int|bool
hasChildren()
Returns the number of children below this current nav item.
bool
isActive(Page|null $c)
Determines whether this nav item is the current page the user is on.
string
getDescription()
Returns the description of the current navigation item (typically grabbed from the page's short description field).
string
getTarget()
Returns a target for the nav item.
string
getURL()
Gets a URL that will take the user to this particular page. Checks against concrete.seo.url_rewriting, the page's path, etc.
.
string
getName()
Gets the name of the page or link.
int
getCollectionID()
Gets the pageID for the navigation item.
int
getLevel()
Gets the current level at the nav tree that we're at.
void
setCollectionObject(Page $obj)
Sets the collection Object of the navigation item to the passed object.
Page
getCollectionObject()
Gets the collection Object of the navigation item.