/** * Display imports * * @return void */ public function displayTask() { // get all imports from archive $hooksArchive = Models\Import\Hook\Archive::getInstance(); $this->view->hooks = $hooksArchive->hooks('list', array('state' => array(1))); // Output the HTML $this->view->setLayout('display')->display(); }
/** * Edit an Import * * @return void */ public function editTask() { Request::setVar('hidemainmenu', 1); // get request vars $ids = Request::getVar('id', array()); $id = isset($ids[0]) ? $ids[0] : null; // get the import object $this->view->import = new Models\Import($id); // import params $this->view->params = new \Hubzero\Config\Registry($this->view->import->get('params')); // get all files in import filespace $this->view->files = \Filesystem::files($this->view->import->fileSpacePath(), '.'); // get all imports from archive $hooksArchive = Models\Import\Hook\Archive::getInstance(); $this->view->hooks = $hooksArchive->hooks('list', array('state' => array(1))); // Get groups $this->view->groups = Group::find(array('authorized' => 'admin', 'fields' => array('cn', 'description', 'published', 'gidNumber', 'type'), 'type' => array(1, 3), 'sortby' => 'description')); // Set any errors foreach ($this->getErrors() as $error) { $this->view->setError($error); } // Output the HTML $this->view->setLayout('edit')->display(); }