29 lines
1.0 KiB
PHP
Executable File
29 lines
1.0 KiB
PHP
Executable File
<?php
|
|
class Zend_View_Helper_breadcrumb extends Zend_View_Helper_Placeholder_Container_Standalone
|
|
{
|
|
public function breadcrumb ($title = null, $setType = Zend_View_Helper_Placeholder_Container_Abstract::APPEND)
|
|
{
|
|
if ($title) {
|
|
if ($setType == Zend_View_Helper_Placeholder_Container_Abstract::SET) {
|
|
$this->set($title);
|
|
} elseif ($setType == Zend_View_Helper_Placeholder_Container_Abstract::PREPEND) {
|
|
$this->prepend($title);
|
|
} else {
|
|
$this->append($title);
|
|
}
|
|
}
|
|
return $this;
|
|
}
|
|
|
|
public function toString ($indent = null)
|
|
{
|
|
$indent = (null !== $indent) ? $this->_getWhitespace($indent) : $this->getIndent();
|
|
$items = array();
|
|
foreach ($this as $item) {
|
|
$items[] = $item;
|
|
}
|
|
$separator = $this->_escape($this->getSeparator());
|
|
if (empty($separator)) $separator='->';
|
|
return $indent . implode($separator, $items);
|
|
}
|
|
} |