public function editAction(\Difra\Param\AnyInt $id) { $editNode = $this->root->appendChild($this->xml->createElement('announcementsEdit')); \Difra\Plugins\Announcements::getInstance()->getByIdXML($id->val(), $editNode); $additionalsFieldsNode = $editNode->appendChild($this->xml->createElement('additionalsFields')); $categoryNode = $editNode->appendChild($this->xml->createElement('announceCateroty')); \Difra\Plugins\Announcements\Additionals::getListXML($additionalsFieldsNode); \Difra\Plugins\Announcements\Category::getList($categoryNode); $locationsNode = $editNode->appendChild($this->xml->createElement('locations')); \Difra\Plugins\Announcements::getInstance()->getLocationsXML($locationsNode); if (\Difra\Plugger::isEnabled('blogs')) { \Difra\Plugins\Blogs\Group::getNewGroupsXml($editNode, 0, false); } }
/** * Проверяет есть ли уже такая категория * @param $name * @return bool */ public function checkCategoryName($name) { return Announcements\Category::checkName($name); }
public function deleteAjaxAction(\Difra\Param\AnyInt $id) { \Difra\Plugins\Announcements\Category::delete($id->val()); $this->ajax->refresh(); }