/** * Creates a new choice view. * * @param string $label The label displayed to humans * @param string $value The view representation of the choice * @param mixed $data The original choice * @param array $attr Additional attributes for the HTML tag */ public function __construct($label, $value, $data, array $attr = array()) { parent::__construct($data, $value, $label); $this->attr = $attr; }
public function isChoiceSelected(FormView $view, ChoiceView $choice) { return FormUtil::isChoiceSelected($choice->getValue(), $view->get('value')); }
public function __construct($data, $value, $label, $level) { parent::__construct($data, $value, $label); $this->level = $level; }