Пример #1
0
 /**
  * Returns the models corresponding to the given values.
  *
  * @param array $values
  *
  * @return array
  *
  * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface
  */
 public function getIndicesForValues(array $values)
 {
     if (!$this->loaded) {
         // Optimize performance for single-field identifiers. We already
         // know that the IDs are used as indices and values
         // Attention: This optimization does not check values for existence
         if (1 === count($this->identifier)) {
             return $this->fixIndices($values);
         }
         $this->load();
     }
     return parent::getIndicesForValues($values);
 }
 /**
  * {@inheritdoc}
  */
 public function getIndicesForValues(array $values)
 {
     if (empty($values)) {
         return array();
     }
     $this->load();
     return parent::getIndicesForValues($values);
 }
Пример #3
0
 /**
  * Returns the entities corresponding to the given values.
  *
  * @param array $values
  *
  * @return array
  *
  * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface
  */
 public function getIndicesForValues(array $values)
 {
     if (!$this->loaded) {
         // Optimize performance for single-field identifiers.
         // Attention: This optimization does not check values for existence
         if ($this->idAsIndex && $this->idAsValue) {
             return $this->fixIndices($values);
         }
         $this->load();
     }
     return parent::getIndicesForValues($values);
 }
 /**
  * {@inheritdoc}
  *
  * @deprecated since version 2.4, to be removed in 3.0.
  */
 public function getIndicesForValues(array $values)
 {
     trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
     if (empty($values)) {
         return array();
     }
     $this->load();
     return parent::getIndicesForValues($values);
 }
Пример #5
0
 /**
  * Returns the entities corresponding to the given values.
  *
  * @param array $values
  *
  * @return array
  *
  * @see ChoiceListInterface
  * @deprecated since version 2.4, to be removed in 3.0.
  */
 public function getIndicesForValues(array $values)
 {
     @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
     // Performance optimization
     if (empty($values)) {
         return array();
     }
     if (!$this->loaded) {
         // Optimize performance for single-field identifiers.
         // Attention: This optimization does not check values for existence
         if ($this->idAsIndex && $this->idAsValue) {
             return $this->fixIndices($values);
         }
         $this->load();
     }
     return parent::getIndicesForValues($values);
 }
Пример #6
0
 /**
  * Returns the resources corresponding to the given values.
  *
  * @param array $values
  *
  * @return array
  *
  * @see Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface
  */
 public function getIndicesForValues(array $values)
 {
     if (!$this->loaded) {
         $this->load();
     }
     return parent::getIndicesForValues($values);
 }