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