public function __construct($name, $label, $url, $options = array()) { $options['formatter'] = array($this, 'formatLink'); $this->url = $url; $this->idProperty = $options['idProperty'] ?: 'id'; parent::__construct($name, $label, $options); }
/** * @param Grido\Grid $grid * @param string $name * @param string $label * @param string $dateFormat */ public function __construct($grid, $name, $label, $dateFormat = NULL) { parent::__construct($grid, $name, $label); if ($dateFormat !== NULL) { $this->dateFormat = $dateFormat; } }
/** * * @param \Database\Resource $resource * @param string $name * @param string $alias * @param boolean $check_existance Sends boolean argument to Column constructor */ public function __construct(\Database\Resource $resource, $name, $alias = null, $check_existance = null) { $check_existance = empty($check_existance) ? DATABASE_CHECK_COLUMNS : $check_existance; parent::__construct($resource, $name, $check_existance); if ($alias) { $this->setAlias($alias); } }
public function __construct($columnName, $maximumLength, $defaultValue = "") { parent::__construct($columnName, $defaultValue); if (!is_numeric($maximumLength)) { throw new \InvalidArgumentException("maximumLength must be numeric"); } $this->maximumLength = $maximumLength; }
public function __construct($name, $columnHeader, $params = array()) { parent::__construct($name, $columnHeader, $params); if (isset($params['sortField']) && !is_null($params['sortField'])) { $this->sortField = $params['sortField']; } else { $this->sortField = lcfirst($this->name); } }
public function __construct($idProperty = 'id') { parent::__construct('_checkbox', '<input type="checkbox" class="check-all" name="check-all"/>', array('required' => true, 'sortable' => false, 'searchable' => false, 'formatter' => function ($record, $col) use($idProperty) { // If record is an object, try to call $record->getId(), then $record->id if (is_object($record)) { $func = $this->camelize('get_' . $idProperty); if (is_callable(array($record, $func))) { $id = call_user_func(array($record, $func)); } else { $id = $record->{$idProperty}; } } else { // Else record is an array, simply access the wanted property $id = $record[$idProperty]; } $id = htmlspecialchars($id); return '<input type="checkbox" class="check-row" name="check[' . $id . ']"/>'; })); }
/** * @param string $name * @param string $field * @param string $entityField * @param array $options */ public function __construct($name, $field, $entityField, array $options = []) { $this->entityField = $entityField; $pos = strpos($field, '.'); if (false !== $pos) { $fields = $field; while (false !== $pos) { $sub = substr($fields, 0, $pos); $this->prefixes[] = EntityColumn::createEntityPrefix($sub); $fields = substr($fields, $pos + 1); $pos = strpos($fields, '.'); if (false === $pos && 0 < strlen($fields)) { $pos = strlen($fields); } } } else { $this->prefixes[] = self::createEntityPrefix($field); } parent::__construct($name, $field, $options); }
public function __construct($actions, $idProperty = 'id') { global $l; parent::__construct('_actions', $l->g(1381), array('required' => true, 'sortable' => false, 'searchable' => false, 'formatter' => function ($record, $col) use($actions, $idProperty) { // If record is an object, try to call $record->getId(), then $record->id if (is_object($record)) { $func = $this->camelize('get_' . $idProperty); if (is_callable(array($record, $func))) { $id = call_user_func(array($record, $func)); } else { $id = $record->{$idProperty}; } } else { // Else record is an array, simply access the wanted property $id = $record[$idProperty]; } $id = htmlspecialchars($id); $actionHtml = ''; foreach ($actions as $url => $class) { $actionHtml .= '<a href="' . $url . $id . '" class="row-action">' . '<span class="' . $class . '"></span>' . '</a>'; } return $actionHtml; })); }
/** * @param Grido\Grid $grid * @param string $name * @param string $label * @param int $decimals number of decimal points * @param string $decPoint separator for the decimal point * @param string $thousandsSep thousands separator */ public function __construct($grid, $name, $label, $decimals = NULL, $decPoint = NULL, $thousandsSep = NULL) { parent::__construct($grid, $name, $label); $this->setNumberFormat($decimals, $decPoint, $thousandsSep); }
public function __construct($column, $name, $format = 'j.n.Y') { parent::__construct($column, $name); $this->format = $format; }
public function __construct($name, $label, $format = 'd/m/Y') { parent::__construct($name, $label); $this->format = $format; }
public function __construct($name, $flags, $extra = array()) { parent::__construct($name, $flags, $extra); }
public function __construct() { parent::__construct(array('id' => self::ID, 'title' => '', 'size' => 15, 'filterable' => true, 'sortable' => false, 'source' => false, 'align' => 'center')); }
public function __construct($column, $name, $languageId) { parent::__construct($column, $name); $this->languageId = $languageId; }
public function __construct($column, $name, $table) { parent::__construct($column, $name); $this->table = $table; $this->setOrdering(false); }
/** * @param \Database\Table $table * @param string $name * @param string $value */ public function __construct(Table $table, $name, $value = null, $check_existence = null) { parent::__construct($table, $name, $check_existence); $this->set($value); }
public function __construct($gridHash) { $this->gridHash = $gridHash; parent::__construct(array('id' => self::ID, 'title' => '', 'size' => 15, 'sortable' => false, 'source' => false, 'align' => 'center')); }
/** * Checkbox column constructor. * @param string column's textual caption * @param string number of digits after the decimal point * @return void */ public function __construct($caption = NULL, $precision = 2) { parent::__construct($caption); $this->precision = $precision; }
public function __construct() { parent::__construct(); $this->setWidth(300); }
/** * Constructor. * * @param array $config */ public function __construct(array $config) { //$this->sortable = false; //unset($config['sortable'], $config['sortableName']); parent::__construct($config); }
/** * @param string $name * @param string $field * @param callable $callback * @param array $options */ public function __construct($name, $field, callable $callback, array $options = []) { $options['format_data_callback'] = $callback; parent::__construct($name, $field, $options); }
public function __construct($columnName, $totalDigits = 8, $decimalDigits = 2, $defaultValue = null) { parent::__construct($columnName, $defaultValue); $this->totalDigits = $totalDigits; $this->decimalDigits = $decimalDigits; }
public function __construct($name, $label, array $options = []) { $options['isGlobal'] = false; $options['icon'] = 'fa fa-file-o'; parent::__construct($name, $label, $options); }
public function __construct($attributeKey, $isSortable = true, $defaultSort = 'asc') { $this->attributeKey = $attributeKey; parent::__construct('ak_' . $attributeKey->getAttributeKeyHandle(), $attributeKey->getAttributeKeyDisplayName(), false, $isSortable, $defaultSort); }
/** * {@inheritDoc} * * @param int $length */ public function __construct($name, $length = null, $nullable = false, $default = null, array $options = []) { $this->setLength($length); parent::__construct($name, $nullable, $default, $options); }
function __construct($name, $yes_str = 'Да', $no_str = 'Нет', $visible = true, $align = 'center', $width = false) { parent::__construct($name, $visible, $align, $width); $this->value_arr[0] = $no_str; $this->value_arr[1] = $yes_str; }
public function __construct($column, $title, array $rowActions = array()) { $this->rowActions = $rowActions; parent::__construct(array('id' => $column, 'title' => $title, 'sortable' => false, 'source' => false, 'filterable' => true)); }
public function __construct($column, $name, $roleId) { parent::__construct($column, $name); $this->roleId = $roleId; $this->setOrdering(false); }