Beispiel #1
0
 /**
  * The handler for listing datasets
  *
  * @param mixed $handler_id the array key from the request array
  * @param array $args the arguments given to the handler
  * @param array &$data The local request data.
  * @return boolean Indicating success.
  */
 function _handler_read($handler_id, $args, &$data)
 {
     $this->_request_data['topic']->require_do('midgard:admin');
     $_MIDCOM->enable_jquery();
     $qb = fi_opengov_datacatalog_dataset_suggestion_dba::new_query_builder();
     switch ($handler_id) {
         case 'suggestion_view':
             if (isset($args[0])) {
                 if ($args[0] != 'all') {
                     $qb->add_constraint('guid', '=', $args[0]);
                 }
             }
             break;
     }
     $this->suggestions = $qb->execute();
     if (count($this->suggestions) == 1) {
         $this->_object = $this->suggestions[0];
     }
     $this->_update_breadcrumb($handler_id);
     $this->_populate_toolbar($handler_id);
     return true;
 }