/** * Converts a poll id into an actual Poll object. * * @param string $source * @param string $targetType * @param array $convertedChildProperties * @param PropertyMappingConfigurationInterface|null $configuration * @return Poll */ public function convertFrom($source, $targetType, array $convertedChildProperties = array(), PropertyMappingConfigurationInterface $configuration = null) { $pollRepository = DoodleUtility::initializePollRepository(); $poll = $pollRepository->findById($source); return $poll; }
/** * Injects a poll repository. * * @return void */ public function initializeAction() { $this->pollRepository = DoodleUtility::initializePollRepository(); }