public function getValue() { $value = parent::getValue(); if (!$value instanceof Model && !empty($value)) { $model = $this->getModel(); $model->loadByPK($value); $this->set('value', $model); } return parent::getValue(); }
public function __construct(Crud $crud, $fieldOptions) { parent::__construct($crud, $fieldOptions); $this->set('default', Config::get('lang')); }