コード例 #1
0
ファイル: ChoiceField.php プロジェクト: skoop/symfony-sandbox
 /**
  * {@inheritDoc}
  *
  * Takes care of converting the input from a single radio button
  * to an array.
  */
 public function bind($value)
 {
     if (!$this->getOption('multiple') && $this->getOption('expanded')) {
         $value = $value === null ? array() : array($value => true);
     }
     parent::bind($value);
 }
コード例 #2
0
ファイル: ChoiceField.php プロジェクト: notbrain/symfony
 /**
  * {@inheritDoc}
  *
  * Takes care of converting the input from a single radio button
  * to an array.
  */
 public function bind($value)
 {
     if (!$this->isMultipleChoice() && $this->isExpanded()) {
         $value = null === $value ? array() : array($value => true);
     }
     parent::bind($value);
 }