getAdminTable() public static method

public static getAdminTable ( )
Esempio n. 1
0
 private function _setGroup(&$iaView, array $groupData)
 {
     $iaItem = $this->_iaCore->factory('item');
     if ($this->_type) {
         $entity = 'user' == $this->_type ? $this->_iaCore->factory('users')->getInfo($this->_typeId) : $this->_iaDb->row(array('name'), iaDb::convertIds($this->_typeId), iaUsers::getUsergroupsTable());
         if (!$entity) {
             return iaView::errorPage(iaView::ERROR_NOT_FOUND);
         }
         $title = 'user' == $this->_type ? $entity['fullname'] : iaLanguage::get('usergroup_' . $entity['name']);
         $title = iaLanguage::getf('custom_configuration_title', array('settings' => $groupData['title'], 'title' => $title, 'type' => strtolower(iaLanguage::get('user' == $this->_type ? 'member' : 'usergroup'))));
     } else {
         $title = $groupData['title'];
     }
     $iaView->title($title);
     if ($groupData['extras']) {
         $iaPage = $this->_iaCore->factory('page', iaCore::ADMIN);
         $activeMenu = $groupData['name'];
         if ($groupData['extras'] == $this->_iaCore->get('tmpl')) {
             // template configuration options
             $page = $iaPage->getByName('templates');
             $iaView->set('group', $page['group']);
             $iaView->set('active_config', $groupData['name']);
             iaBreadcrumb::add($page['title'], IA_ADMIN_URL . $page['alias']);
         } elseif ($pluginPage = $this->_iaDb->row(array('alias', 'group'), iaDb::printf("`name` = ':name' OR `name` = ':name_stats'", array('name' => $groupData['extras'])), iaPage::getAdminTable())) {
             // it is a package
             $iaView->set('group', $pluginPage['group']);
             $iaView->set('active_config', $groupData['name']);
             $activeMenu = null;
             iaBreadcrumb::insert($groupData['title'], IA_ADMIN_URL . $pluginPage['alias'], iaBreadcrumb::POSITION_FIRST);
         } elseif ($iaItem->isExtrasExist($groupData['extras'], iaItem::TYPE_PLUGIN)) {
             // plugin with no admin pages
             $iaView->set('group', 5);
             $iaView->set('active_config', $groupData['extras']);
         }
     } else {
         $activeMenu = 'configuration_' . $groupData['name'];
         iaBreadcrumb::toEnd($groupData['title'], IA_SELF);
     }
     $iaView->set('active_menu', $activeMenu);
 }
Esempio n. 2
0
 private function _setGroup(&$iaView, &$iaItem, array $groupData)
 {
     $iaView->title($groupData['title']);
     if ($groupData['extras']) {
         $iaPage = $this->_iaCore->factory('page', iaCore::ADMIN);
         $activeMenu = $groupData['name'];
         if ($groupData['extras'] == $this->_iaCore->get('tmpl')) {
             // template configuration options
             $page = $iaPage->getByName('templates');
             $iaView->set('group', $page['group']);
             $iaView->set('active_config', $groupData['name']);
             iaBreadcrumb::add($page['title'], IA_ADMIN_URL . $page['alias']);
         } elseif ($pluginPage = $this->_iaDb->row(array('alias', 'group'), iaDb::printf("`name` = ':name' OR `name` = ':name_stats'", array('name' => $groupData['extras'])), iaPage::getAdminTable())) {
             // it is a package
             $iaView->set('group', $pluginPage['group']);
             $iaView->set('active_config', $groupData['name']);
             $activeMenu = null;
             iaBreadcrumb::insert($groupData['title'], IA_ADMIN_URL . $pluginPage['alias'], iaBreadcrumb::POSITION_FIRST);
         } elseif ($iaItem->isExtrasExist($groupData['extras'], iaItem::TYPE_PLUGIN)) {
             // plugin with no admin pages
             $iaView->set('group', 5);
             $iaView->set('active_config', $groupData['extras']);
         }
     } else {
         $activeMenu = 'configuration_' . $groupData['name'];
         iaBreadcrumb::toEnd($groupData['title'], IA_SELF);
     }
     $iaView->set('active_menu', $activeMenu);
 }