Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function getLoadValue()
 {
     $value = (array) parent::getLoadValue();
     // Sync the array keys as the ID to make the
     // table widget happy!
     foreach ($value as $key => $_value) {
         $value[$key] = ['id' => $key] + (array) $_value;
     }
     return $value;
 }
Exemplo n.º 2
0
 public function __construct($controller, $model, $formField, $configuration = [])
 {
     $this->manager = ActivityManager::instance();
     parent::__construct($controller, $model, $formField, $configuration);
 }
Exemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 public function getLoadValue()
 {
     $value = parent::getLoadValue();
     if ($this->mode === static::MODE_RELATION) {
         return $this->getRelationObject()->lists($this->nameFrom);
     }
     return $this->mode === static::MODE_STRING ? explode($this->getSeparatorCharacter(), $value) : $value;
 }
Exemplo n.º 4
0
 /**
  * {@inheritDoc}
  */
 public function init()
 {
     $this->fillFromConfig(['modelClass', 'selectFrom', 'pattern']);
     $this->assertModelClass();
     parent::init();
 }