示例#1
0
文件: index.php 项目: difra-org/difra
 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);
     }
 }
示例#2
0
 /**
  * Проверяет есть ли уже такая категория
  * @param $name
  * @return bool
  */
 public function checkCategoryName($name)
 {
     return Announcements\Category::checkName($name);
 }
示例#3
0
 public function deleteAjaxAction(\Difra\Param\AnyInt $id)
 {
     \Difra\Plugins\Announcements\Category::delete($id->val());
     $this->ajax->refresh();
 }