/**
  * Lists all concept schemes.
  */
 public function indexAction()
 {
     $this->_requireAccess('editor.concept-schemes', 'index', self::RESPONSE_TYPE_HTML);
     // Clears the schemes cache when we start managing them.
     OpenSKOS_Cache::getCache()->remove(Editor_Models_ApiClient::CONCEPT_SCHEMES_CACHE_KEY);
     $this->view->uploadedIcons = $this->_getUploadedIcons();
     $this->view->conceptSchemes = Editor_Models_ApiClient::factory()->getConceptSchemes();
     $this->view->conceptSchemesWithDeleteJobs = $this->_getConceptSchemesWithDeleteJob();
     $user = OpenSKOS_Db_Table_Users::fromIdentity();
     $modelCollections = new OpenSKOS_Db_Table_Collections();
     $this->view->collectionsMap = $modelCollections->getIdToTitleMap($user->tenant);
 }
 /**
  * This builds the buttons for the form.
  *
  * @return Editor_Forms_ConceptScheme
  */
 protected function buildHeader()
 {
     $this->addElement('hidden', 'uuid', array('decorators' => array()));
     // Collections
     $modelCollections = new OpenSKOS_Db_Table_Collections();
     $collectionOptions = $modelCollections->getIdToTitleMap($this->_getCurrentTenant()->code);
     $this->addElement('select', 'collection', array('label' => _('Collection:'), 'multiOptions' => $collectionOptions, 'decorators' => array('ViewHelper', 'Label', array('HtmlTag', array('tag' => 'br', 'placement' => Zend_Form_Decorator_HtmlTag::APPEND)))));
     // Uri code
     $this->addElement('text', 'uriBase', array('label' => 'URI: ', 'decorators' => array('ViewHelper', 'Label'), 'filters' => array('StringTrim')));
     $this->getElement('uriBase')->setRequired(true);
     $this->addElement('text', 'uriCode', array('decorators' => array('ViewHelper'), 'filters' => array('StringTrim')));
     $this->getElement('uriCode')->setRequired(true);
     $this->addElement('submit', 'conceptSchemeSave', array('label' => _('Ok'), 'class' => 'concept-edit-submit', 'decorators' => array('ViewHelper', array('HtmlTag', array('tag' => 'span', 'id' => 'concept-edit-action')))));
     $this->addDisplayGroup(array('collection', 'uriBase', 'uriCode', 'conceptSchemeSave'), 'concept-header', array('legend' => 'header', 'disableDefaultDecorators' => true, 'decorators' => array('FormElements', array('HtmlTag', array('tag' => 'div', 'id' => 'concept-edit-header')))));
     return $this;
 }