[Form] Rename UnmodifiableFormConfig to ImmutableFormConfig
This commit is contained in:
parent
274eb9ebaf
commit
c81b2ad3e2
|
@ -126,8 +126,8 @@ class Form implements \IteratorAggregate, FormInterface
|
|||
*/
|
||||
public function __construct(FormConfigInterface $config)
|
||||
{
|
||||
if (!$config instanceof UnmodifiableFormConfig) {
|
||||
$config = new UnmodifiableFormConfig($config);
|
||||
if (!$config instanceof ImmutableFormConfig) {
|
||||
$config = new ImmutableFormConfig($config);
|
||||
}
|
||||
|
||||
// Compound forms always need a data mapper, otherwise calls to
|
||||
|
@ -152,7 +152,7 @@ class Form implements \IteratorAggregate, FormInterface
|
|||
/**
|
||||
* Returns the configuration of the form.
|
||||
*
|
||||
* @return UnmodifiableFormConfig The form's immutable configuration.
|
||||
* @return ImmutableFormConfig The form's immutable configuration.
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
namespace Symfony\Component\Form;
|
||||
|
||||
use Symfony\Component\Form\Util\PropertyPath;
|
||||
use Symfony\Component\EventDispatcher\UnmodifiableEventDispatcher;
|
||||
use Symfony\Component\EventDispatcher\ImmutableEventDispatcher;
|
||||
|
||||
/**
|
||||
* A read-only form configuration.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class UnmodifiableFormConfig implements FormConfigInterface
|
||||
class ImmutableFormConfig implements FormConfigInterface
|
||||
{
|
||||
/**
|
||||
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
|
||||
|
@ -134,8 +134,8 @@ class UnmodifiableFormConfig implements FormConfigInterface
|
|||
public function __construct(FormConfigInterface $config)
|
||||
{
|
||||
$dispatcher = $config->getEventDispatcher();
|
||||
if (!$dispatcher instanceof UnmodifiableEventDispatcher) {
|
||||
$dispatcher = new UnmodifiableEventDispatcher($dispatcher);
|
||||
if (!$dispatcher instanceof ImmutableEventDispatcher) {
|
||||
$dispatcher = new ImmutableEventDispatcher($dispatcher);
|
||||
}
|
||||
|
||||
$this->dispatcher = $dispatcher;
|
Reference in New Issue