/** * @return Grid * */ public function header() { $this->_gridRowSet->thead = new TableHead(); $headerRow = new TableRow(); $headerRow->attr('role', 'row'); if ($this->_hasCountLine) { array_unshift($this->_columns, array('label' => '#', 'dindex' => '__GRID_COLUMN_COUNTLINE__')); } if ($this->_canEdit || $this->_canDetail || $this->_canDelete || $this->_canChangeStatus) { $this->_columns[] = array('label' => 'Ações', 'dindex' => '__GRID_COLUMN_HANDLE__', 'attr' => GridColumn::T_GRIDCOLUMN_STR_COLUMN_ACTION); } # repassa informacao para o js sobre a coluna de acao $this->_gridRowSet->thead->add(Input::factory('rowPerm', 'hidden', $this->controllButtonJSon())); foreach ($this->_columns as $column) { if (isset($column['hide']) && TRUE === $column['hide']) { continue; } $tmpSort = $this->safeToggle($column, 'sorter'); $column = new GridColumn($this, $column); $column->setSorter($tmpSort); $headerRow->add($column->build()); } $this->_gridRowSet->thead->add($headerRow); return $this; }
/** * @return AutoComplete * */ public function build() { $input = $this->createInputFilter(); $inputInfo = Input::factory($this->_ident . '-info', 'hidden', str_replace('"', "'", json_encode($this->infoToJS()))); $this->_autoComplete->add($input)->add($this->_curtain)->add($inputInfo)->add(Style::factory($this->getUrlCSS(), 'screen'))->add(Javascript::factory($this->getUrlJS())); return $this->_autoComplete; }