/** * * @param array $row */ public function setChoice($row) { $sessionChoices = []; if ($this->sessionManager->has('choices')) { $sessionChoices = $this->sessionManager->get('choices'); } $row['data'] = $this->genericEntityManager->getData($row['choice'], $row['className'], $row['fieldName'], $row['relationId']); $sessionChoices[self::getIndexChoice($row)] = $row; $this->sessionManager->set('choices', $sessionChoices); $this->diffHandler->getChoicesFile()->save($sessionChoices); }
/** * @param DiffHandler $diffHandler * @param string $collectionCode */ public function init(DiffHandler $diffHandler, $collectionCode) { $this->collectionCode = $collectionCode; $this->set('choices', $diffHandler->getChoicesFile()->getContent()); }