/** * getFolderSecurity * @param Zend_Db_Table_Rowset_Abstract $objRowset * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ public function getFolderSecurity($objRowset) { $this->core->logger->debug('core->views->helpers->FolderHelper->getFolderSecurity()'); $strOutput = ''; $arrZooluSecurity = array(); $arrWebsiteSecurity = array(); foreach ($objRowset as $objRow) { if ($this->core->sysConfig->zone->zoolu == $objRow->zone) { $arrZooluSecurity[] = $objRow->id; } else { if ($this->core->sysConfig->zone->website == $objRow->zone) { $arrWebsiteSecurity[] = $objRow->id; } } } $arrGroups = array(); $sqlStmt = $this->core->dbh->query("SELECT `id`, `title` FROM `groups` ORDER BY `title`")->fetchAll(); foreach ($sqlStmt as $arrSql) { $arrGroups[$arrSql['id']] = $arrSql['title']; } $objZooluSecurityElement = new Zend_Form_Element_MultiCheckbox('ZooluSecurity', array('value' => $arrZooluSecurity, 'label' => $this->core->translate->_('groups', false), 'multiOptions' => $arrGroups, 'columns' => 6, 'class' => 'multiCheckbox')); $objZooluSecurityElement->addPrefixPath('Form_Decorator', GLOBAL_ROOT_PATH . 'library/massiveart/generic/forms/decorators/', 'decorator'); $objZooluSecurityElement->setDecorators(array('Input')); $objWebsiteSecurityElement = new Zend_Form_Element_MultiCheckbox('WebsiteSecurity', array('value' => $arrWebsiteSecurity, 'label' => $this->core->translate->_('groups', false), 'multiOptions' => $arrGroups, 'columns' => 6, 'class' => 'multiCheckbox')); $objWebsiteSecurityElement->addPrefixPath('Form_Decorator', GLOBAL_ROOT_PATH . 'library/massiveart/generic/forms/decorators/', 'decorator'); $objWebsiteSecurityElement->setDecorators(array('Input')); $strOutput .= ' <div id="divTab_ZOOLU"> ' . $objZooluSecurityElement->render() . ' </div> <div id="divTab_Website" style="display:none;"> ' . $objWebsiteSecurityElement->render() . ' </div>'; /** * return html output */ return $strOutput; }