Added exception when setAutoInitialize is called when locked
This commit is contained in:
parent
16ba4579a7
commit
c269d6feda
@ -855,6 +855,10 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function setAutoInitialize($initialize)
|
public function setAutoInitialize($initialize)
|
||||||
{
|
{
|
||||||
|
if ($this->locked) {
|
||||||
|
throw new BadMethodCallException('FormConfigBuilder methods cannot be accessed anymore once the builder is turned into a FormConfigInterface instance.');
|
||||||
|
}
|
||||||
|
|
||||||
$this->autoInitialize = (bool) $initialize;
|
$this->autoInitialize = (bool) $initialize;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Reference in New Issue
Block a user