Пример #1
0
 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
 private function _showEvent($link)
 {
     $Announcements = \Difra\Plugins\Announcements::getInstance();
     $Announce = $Announcements->getByLink($link);
     if ($Announce === false) {
         throw new \Difra\View\HttpError(404);
         return;
     }
     if ($link != $Announce->getShortLink()) {
         \Difra\View::redirect($Announce->getShortLink());
     }
     $Announce->getXML($this->eventRoot);
     $additionalsFieldsNode = $this->eventRoot->appendChild($this->eventRoot->ownerDocument->createElement('additionalsFields'));
     \Difra\Plugins\Announcements\Additionals::getListXML($additionalsFieldsNode);
 }
Пример #3
0
 public function indexAction()
 {
     $addNode = $this->root->appendChild($this->xml->createElement('announcementsAdditionals'));
     \Difra\Plugins\Announcements\Additionals::getListXML($addNode);
 }