public function getBodyAttributes($data) { $attributes = parent::getBodyAttributes($data); if (isset($this->grid['editable']) && $this->isEditable()) { $this->checkColumnId($data); $attributes = array_merge($attributes, array('data-editable' => $this->option[self::ID], 'data-editable-type' => 'text')); } $attributes['class'] = 'type-text'; return parent::mergeAttributes($data, $attributes); }
public function getBodyAttributes($data) { if (isset($data[$this->option[self::ID]]) === FALSE && is_null($data[$this->option[self::ID]]) === FALSE) { throw new Grid_Exception('Column ' . $this->option[self::ID] . ' does not exists in DataSource.'); } $attributes = parent::getBodyAttributes($data); if (isset($this->grid['editable']) && $this->isEditable()) { $attributes = array('data-editable' => $this->option[self::ID], 'data-editable-type' => 'number', 'data-separator' => $this->option[self::THOUSANDS_SEP], 'data-unit' => is_null($this->option[self::UNIT]) ? '' : $this->option[self::UNIT]); } $attributes['class'] = 'type-number'; return parent::mergeAttributes($data, $attributes); }
public function getBodyAttributes($data) { if (isset($data[$this->option[self::ID]]) === FALSE && is_null($data[$this->option[self::ID]]) === FALSE) { throw new Grid_Exception('Column ' . $this->option[self::ID] . ' does not exists in DataSource.'); } $attributes = parent::getBodyAttributes($data); if (isset($this->grid['editable']) && $this->isEditable()) { $attributes = array('data-editable' => $this->option[self::ID], 'data-editable-type' => 'date', 'data-date-format' => $this->formatToMomentJsFormat($this->option[self::FORMAT])); } $attributes['class'] = 'type-date'; return parent::mergeAttributes($data, $attributes); }