/** * Display module contents * * @return void */ public function display() { if (!\App::isAdmin()) { return; } // include group page archive model require_once Component::path('com_groups') . DS . 'models' . DS . 'page' . DS . 'archive.php'; // include group module archive model require_once Component::path('com_groups') . DS . 'models' . DS . 'module' . DS . 'archive.php'; // get unapproved pages $groupModelPageArchive = new Models\Page\Archive(); $this->unapprovedPages = $groupModelPageArchive->pages('unapproved', array('state' => array(0, 1)), true); // get unapproved modules $groupModelModuleArchive = new Models\Module\Archive(); $this->unapprovedModules = $groupModelModuleArchive->modules('unapproved', array('state' => array(0, 1)), true); // Get the view parent::display(); }
/** * Display Group Pages * * @return void */ public function displayTask() { // check in for user Helpers\Pages::checkinForUser(); // get group pages $pageArchive = new Page\Archive(); $this->view->pages = $pageArchive->pages('tree', array('gidNumber' => $this->group->get('gidNumber'), 'state' => array(0, 1), 'orderby' => 'lft ASC')); // get page categories $categoryArchive = new Page\Category\Archive(); $this->view->categories = $categoryArchive->categories('list', array('gidNumber' => $this->group->get('gidNumber'), 'orderby' => 'title')); // get modules archive $moduleArchive = new Module\Archive(); $this->view->modules = $moduleArchive->modules('list', array('gidNumber' => $this->group->get('gidNumber'), 'state' => array(0, 1), 'orderby' => 'position ASC, ordering ASC')); // get request vars $this->view->search = Request::getWord('search', ''); $this->view->filter = Request::getInt('filer', 0); //build pathway $this->_buildPathway(); //build title $this->_buildTitle(); //set view vars $this->view->title = Lang::txt('COM_GROUPS_PAGES_MANAGE') . ': ' . $this->group->get('description'); // get view notifications $this->view->notifications = $this->getNotifications(); $this->view->notifications = $this->view->notifications ? $this->view->notifications : array(); $this->view->group = $this->group; $this->view->config = $this->config; //display $this->view->setLayout('manager'); $this->view->display(); }
/** * Get Page Children * * @return */ public function getChildren() { // load pages that are decendents of this page $archive = new Page\Archive(); $children = $archive->pages('list', array('gidNumber' => $this->get('gidNumber'), 'left' => $this->get('lft'), 'right' => $this->get('rgt'), 'orderby' => 'lft ASC')); return $children; }