_addItem($this->getItem()); } public function getItem() { $item = [ 'submitLinks' => static::getSubmitUrl(), 'tpl' => Qs_SiteMap::getTemplate('Classified/submit-buttons.tpl') ]; return $item; } public static function create() { return new self(array('doc' => Zend_Registry::get('doc'))); } public function render() { $item = $this->getItem(); $this->_initItem($item); $this->_doc->assign('item', new Qs_Doc_Item($item)); return $this->_doc->fetchTemplate($item['tpl']); } static public function getSubmitUrl() { $urls = []; $types = [ AbstractObj::TYPE_FOR_SALE, AbstractObj::TYPE_WANTED, AbstractObj::TYPE_HELP_WANTED, AbstractObj::TYPE_OTHER ]; foreach ($types as $type) { $urls[$type] = Qs_SiteMap::findFirst( null, array('type' => 'Classified\\Login\\'), ['type' => $type], 'url' ); } return $urls; } }