merged branch bschussek/issue5722 (PR #5723)
This PR was merged into the master branch.
Commits
-------
e65ff0b
[Form] Removed unused method ChoiceView::isSelected()
Discussion
----------
[Form] Removed unused method ChoiceView::isSelected()
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5722
Todo: -
License of the code: MIT
Documentation PR: -
This commit is contained in:
commit
1c1cda67db
@ -52,20 +52,4 @@ class ChoiceView
|
|||||||
$this->value = $value;
|
$this->value = $value;
|
||||||
$this->label = $label;
|
$this->label = $label;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns whether this choice is selected for the given value.
|
|
||||||
*
|
|
||||||
* @param string|array $value The selected choice value.
|
|
||||||
*
|
|
||||||
* @return Boolean Whether the choice is selected.
|
|
||||||
*/
|
|
||||||
public function isSelected($value)
|
|
||||||
{
|
|
||||||
if (is_array($value)) {
|
|
||||||
return false !== array_search($this->value, $value, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->value === $value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user