public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     $va_sortable_elements = ca_metadata_elements::getSortableElements($this->ops_tablename, $this->opn_type_restriction_id);
     $this->opa_sorts = array();
     foreach ($va_sortable_elements as $vn_element_id => $va_sortable_element) {
         $this->opa_sorts[$this->ops_tablename . '.' . $va_sortable_element['element_code']] = $va_sortable_element['display_label'];
     }
 }
Exemplo n.º 2
0
 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     if ($this->ops_tablename) {
         if ($va_items_per_page_config = $po_request->config->getList('items_per_page_options_for_' . $this->ops_tablename . '_search')) {
             $this->opa_items_per_page = $va_items_per_page_config;
         }
         if (($vn_items_per_page_default = (int) $po_request->config->get('items_per_page_default_for_' . $this->ops_tablename . '_search')) > 0) {
             $this->opn_items_per_page_default = $vn_items_per_page_default;
         } else {
             $this->opn_items_per_page_default = $this->opa_items_per_page[0];
         }
         $this->ops_view_default = null;
         if ($vs_view_default = $po_request->config->get('view_default_for_' . $this->ops_tablename . '_search')) {
             $this->ops_view_default = $vs_view_default;
         }
         $va_sortable_elements = ca_metadata_elements::getSortableElements($this->ops_tablename, $this->opn_type_restriction_id);
         $this->opa_sorts = array();
         foreach ($va_sortable_elements as $vn_element_id => $va_sortable_element) {
             $this->opa_sorts[$this->ops_tablename . '.' . $va_sortable_element['element_code']] = $va_sortable_element['display_label'];
         }
     }
 }