class NavItem (View source)

An object used by the Autonav Block to display navigation items in a tree.

Properties

protected $level
protected $isActive
protected $_c
$hasChildren
$cID
$cPath
$cPointerExternalLink
$cPointerExternalLinkNewWindow
$cvDescription
$cvName

Methods

__construct(array $itemInfo, int $level = 1)

Instantiates an Autonav Block Item.

int
hasChildren()

Returns the number of children below this current nav item.

bool
isActive(Page $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).

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.

setCollectionObject(Page $obj)

Sets the collection Object of the navigation item to the passed object.

getCollectionObject()

Gets the collection Object of the navigation item.

Details

__construct(array $itemInfo, int $level = 1)

Instantiates an Autonav Block Item.

Parameters

array $itemInfo
int $level

int hasChildren()

Returns the number of children below this current nav item.

Return Value

int

bool isActive(Page $c)

Determines whether this nav item is the current page the user is on.

Parameters

Page $c

The page object for the current page

Return Value

bool

string getDescription()

Returns the description of the current navigation item (typically grabbed from the page's short description field).

Return Value

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.

.

Return Value

string $url

string getName()

Gets the name of the page or link.

Return Value

string

int getCollectionID()

Gets the pageID for the navigation item.

Return Value

int

int getLevel()

Gets the current level at the nav tree that we're at.

Return Value

int

setCollectionObject(Page $obj)

Sets the collection Object of the navigation item to the passed object.

Parameters

Page $obj

Page getCollectionObject()

Gets the collection Object of the navigation item.

Return Value

Page