/** * {@inheritdoc} */ public function getChoicesForValues(array $values) { if (!$this->loadedList) { return $this->loader->loadChoicesForValues($values, $this->value); } return $this->loadedList->getChoicesForValues($values); }
/** * {@inheritdoc} */ public function getChoicesForValues(array $values) { if ($this->loaded) { // Check whether the loader has the same cache if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) { @trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED); } return $this->loadedList->getChoicesForValues($values); } return $this->loader->loadChoicesForValues($values, $this->value); }