public function defaultValue($value) { if ($this->get('handleDefault', true)) { return parent::defaultValue($value); } return $this; }
public function setValue($newValue) { if ($newValue == '::1') { $newValue = '127.0.0.1'; } parent::setValue($newValue); }
/** * Create column * @param string $column * @param mixed $true * @param mixed $false * @param boolean $strict * @return BooleanColumn */ public static function create($column, $true = 'Y', $false = 'N', $strict = false) { $return = parent::create($column); $return->true = $true; $return->false = $false; $return->strict = $strict; return $return; }
protected function renderDataCellContent($row, $data) { ob_start(); parent::renderDataCellContent($row, $data); $str = strip_tags(ob_get_clean()); if ($this->maxLength !== false) { $str = HText::crop($str, $this->maxLength); } echo nl2br($str); }
/** * @param $instance * @param int $totalCount * @return string */ public function render($instance, $totalCount) { $list = $this->valueFromInstance($instance, $this->name); $content = []; foreach ($list as $item) { $content[] = $this->htmlBuilder->tag('li', [], $item); } $content = $this->htmlBuilder->tag('ul', ['class' => 'list-unstyled'], implode('', $content)); return parent::render($instance, $totalCount, $content); }
function __construct($name, $text) { parent::__construct($name); $this->text = $text; }
/** * @return array */ public function toArray() { return parent::toArray() + ['editable' => $this->isEditable(), 'editUrl' => $this->getEditUrl(), 'deletable' => $this->isDeletable(), 'deleteUrl' => $this->getDeleteUrl(), 'restorable' => $this->isRestorable(), 'restoreUrl' => $this->getRestoreUrl()]; }
public function valueFromInstance($instance, $name) { $value = parent::valueFromInstance($instance, $name); return (string) view('admin::_partials/columns/boolean')->with('value', $value == 1 ? true : false); }
function __construct($name, $callable) { parent::__construct($name); $this->callable = $callable; }
/** * Create column * @param string $column * @param bollean $integer * @return self */ public static function create($column, $integer = true) { $return = parent::create($column); $return->integer = $integer; return $return; }
public function onUpdate(\Extasy\ORM\QueryBuilder $queryBuilder) { parent::onUpdate($queryBuilder); $this->autoCreate(); }
function __construct($name, $format = 2, $custom = "") { parent::__construct($name); $this->format = $format; $this->custom = $custom; }
/** * Create column * @param string $column * @param string $format * @return self */ public static function create($column, $format = 'full') { $return = parent::create($column); $return->setFormat($format); return $return; }
public function render($instance, $totalCount) { $content = count($this->valueFromInstance($instance, $this->name)); return parent::render($instance, $totalCount, $content); }
/** * Constructor * * @param CreateTable $table * @param string $name * @param string $type */ public function __construct(CreateTable $table, $name, $type) { $this->table = $table; parent::__construct($name, $type); }
/** * Initialize column */ public function initialize() { parent::initialize(); //AssetManager::addScript('admin::default/js/bootbox.js'); //AssetManager::addScript('admin::default/js/columns/control.js'); }
public function setValue($newValue) { parent::setValue(boolval($newValue)); }