Back to Pathway class

Method addItem

public bool
addItem
(mixed $name, mixed $link = '')
Create and add an item to the pathway.
Parameters
  • string $name The name of the item.
  • string $link The link to the item.
Returns
  • bool True on success
Since
  • 1.5
Class: Pathway
Project: Joomla

Method addItem - Source code

/**
 * Create and add an item to the pathway.
 *
 * @param   string  $name  The name of the item.
 * @param   string  $link  The link to the item.
 *
 * @return  boolean  True on success
 *
 * @since   1.5
 */
public function addItem($name, $link = '')
{
    $ret = false;
    if ($this->pathway[] = $this->makeItem($name, $link)) {
        $ret = true;
        $this->count++;
    }
    return $ret;
}