Пример #1
0
 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();
 }
Пример #2
0
 public function __construct(Crud $crud, $fieldOptions)
 {
     parent::__construct($crud, $fieldOptions);
     $this->set('default', Config::get('lang'));
 }