Beispiel #1
0
 /**
  * Add EditList to site
  *
  * @param XmlBlockCollection $this->_mainBlock
  * @param string $site
  * @param AnyDataset $dataset
  */
 protected function AddEditListToSite($block, $site, $dataset)
 {
     $para = new XmlParagraphCollection();
     $this->_mainBlock->addXmlnukeObject($para);
     $this->url->addParam("editsite", $site);
     $editList = new XmlEditList($this->_context, $this->myWords->Value("EDITLIST_TITLE", $site), $this->url->getUrl(), true, false, true, true);
     $editList->setDataSource($dataset->getIterator());
     $listField = new EditListField();
     $listField->editlistName = "";
     $listField->fieldData = "role";
     $editList->addEditListField($listField);
     $listField = new EditListField();
     $listField->editlistName = $this->myWords->Value("EDITLIST_ROLES");
     $listField->fieldData = $this->user->getRolesTable()->Role;
     $editList->addEditListField($listField);
     $listField = new EditListField();
     $listField->editlistName = $this->myWords->Value("EDITLIST_SITES");
     $listField->fieldData = $this->user->getRolesTable()->Site;
     $editList->addEditListField($listField);
     $para->addXmlnukeObject($editList);
 }
Beispiel #2
0
 protected function _beforeSave()
 {
     parent::_beforeSave();
     if (!$this->secret) {
         $this->setSecret(self::genSecretKey());
     }
 }