Breadcrumb view helper, #16

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@138 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
pzinovkin
2010-03-27 17:37:52 +00:00
parent b817008f3a
commit 52c9c9e319
2 changed files with 60 additions and 1 deletions

View File

@ -12,6 +12,8 @@
class ViewHelperTitle extends ViewHelper
{
protected $separator = ' - ';
public function title($string = false)
{
if ($string) {
@ -22,8 +24,13 @@ class ViewHelperTitle extends ViewHelper
return $this;
}
public function setSeparator($sep)
{
$this->separator = $sep;
}
public function __toString()
{
return implode(' - ', Registry::get(__CLASS__, array()));
return implode($this->separator, Registry::get(__CLASS__, array()));
}
}