Пример #1
0
 /**
  * Create the table header
  * param string $order             The table order
  */
 public function createListTableHeader(&$order)
 {
     $tableConfig = new R3BaseTableConfig(R3AuthInstance::get());
     $tableColumns = $tableConfig->getConfig($this->getTableColumnConfig(), $this->baseName);
     foreach ($tableColumns as $fieldName => $colDef) {
         if ($colDef['visible']) {
             $this->simpleTable->addSimpleField($colDef['label'], $fieldName, $colDef['type'], $colDef['width'], $colDef['options']);
         }
     }
     $this->simpleTable->addSimpleField(_('Azione'), '', 'link', 85);
     $this->tableHtml = $this->simpleTable->CreateTableHeader($order, 'global_strategy_list_table');
 }
Пример #2
0
 public function getData($id = null)
 {
     // get data from class
     $obj = R3Controller::factory(array('on' => $this->module));
     $tableConfig = new R3BaseTableConfig(R3AuthInstance::get());
     $tableColumns = $tableConfig->getConfig($obj->getTableColumnConfig(), $this->module);
     $widthList = array(100, 200, 500);
     foreach ($tableColumns as $key => $col) {
         if ($tableColumns[$key]['width'] > 0 && !in_array($tableColumns[$key]['width'], $widthList)) {
             $widthList[] = $tableColumns[$key]['width'];
         }
         sort($widthList);
         $tableColumns[$key]['width_list'] = array_merge(array(null), $widthList);
     }
     return $tableColumns;
 }
Пример #3
0
 public function createListTableHeader(&$order)
 {
     $this->columnTypes = array();
     $tableConfig = new R3BaseTableConfig(R3AuthInstance::get());
     $tableColumns = $tableConfig->getConfig($this->getTableColumnConfig(), $this->baseName);
     foreach ($tableColumns as $fieldName => $colDef) {
         $this->columnTypes[$fieldName] = array('type' => strtolower($colDef['type']), 'options' => $colDef['options']);
         if ($colDef['visible']) {
             $this->simpleTable->addSimpleField($colDef['label'], $fieldName, 'CALCULATED', $colDef['width'], $colDef['options']);
         }
     }
     if ($this->hasInvalidSimulation()) {
         $this->simpleTable->addSimpleField(_('Stato'), 'status', 'CALCULATED', 100);
     }
     $this->simpleTable->addSimpleField(_('Azione'), '', 'link', 85);
     $this->tableHtml = $this->simpleTable->CreateTableHeader($order, 'global_strategy_list_table');
 }