示例#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;
 }
示例#2
0
 public function __construct($controller, $model, $formField, $configuration = [])
 {
     $this->manager = ActivityManager::instance();
     parent::__construct($controller, $model, $formField, $configuration);
 }
示例#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;
 }
示例#4
0
 /**
  * {@inheritDoc}
  */
 public function init()
 {
     $this->fillFromConfig(['modelClass', 'selectFrom', 'pattern']);
     $this->assertModelClass();
     parent::init();
 }