Example #1
0
    protected function _generatePathway($category = null, $document = null)
    {
        $document = $this->getModel()->fetch();

        if ($this->getLayout() === 'form')
        {
            $translator = $this->getObject('translator');

            if($document->isNew()) {
                $text = $translator->translate('Add new document');
            } else {
                $text = $translator->translate('Edit document {title}', array('title' => $document->title));
            }

            $this->getPathway()->addItem($text, '');
        }
        else
        {
            $category = $this->getObject('com://site/docman.model.categories')
                              ->id($document->docman_category_id)
                              ->fetch();

            parent::_generatePathway($category, $document);
        }
    }
Example #2
0
    protected function _generatePathway($category = null, $document = null)
    {
        $category = $this->getModel()->fetch();

        parent::_generatePathway(($category->id ? $category : null));
    }