PHP Class spec\Sylius\Bundle\ResourceBundle\Form\EventSubscriber\AddCodeFormSubscriberSpec

Author: Anna Walasek ([email protected])
Inheritance: extends PhpSpec\ObjectBehavior
Datei anzeigen Open project: sylius/sylius

Public Methods

Method Description
it_adds_code_with_label_sylius_ui_code_by_default ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
it_adds_code_with_specified_type ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
it_adds_code_with_specified_type_and_label ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
it_adds_code_with_type_text_by_default ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
it_implements_event_subscriber_interface ( )
it_is_initializable ( )
it_sets_code_as_disabled_when_resource_is_not_new ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
it_sets_code_as_enabled_when_resource_is_new ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
it_sets_code_as_enabled_when_there_is_no_resource ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form )
it_subscribes_to_event ( )
it_throws_exception_when_resource_does_not_implement_code_aware_interface ( Symfony\Component\Form\FormEvent $event, $object )

Method Details

it_adds_code_with_label_sylius_ui_code_by_default() public method

public it_adds_code_with_label_sylius_ui_code_by_default ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\FormInterface
$resource Sylius\Component\Resource\Model\CodeAwareInterface

it_adds_code_with_specified_type() public method

public it_adds_code_with_specified_type ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\FormInterface
$resource Sylius\Component\Resource\Model\CodeAwareInterface

it_adds_code_with_specified_type_and_label() public method

public it_adds_code_with_specified_type_and_label ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\FormInterface
$resource Sylius\Component\Resource\Model\CodeAwareInterface

it_adds_code_with_type_text_by_default() public method

public it_adds_code_with_type_text_by_default ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\FormInterface
$resource Sylius\Component\Resource\Model\CodeAwareInterface

it_implements_event_subscriber_interface() public method

it_is_initializable() public method

public it_is_initializable ( )

it_sets_code_as_disabled_when_resource_is_not_new() public method

public it_sets_code_as_disabled_when_resource_is_not_new ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\FormInterface
$resource Sylius\Component\Resource\Model\CodeAwareInterface

it_sets_code_as_enabled_when_resource_is_new() public method

public it_sets_code_as_enabled_when_resource_is_new ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form, Sylius\Component\Resource\Model\CodeAwareInterface $resource )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\FormInterface
$resource Sylius\Component\Resource\Model\CodeAwareInterface

it_sets_code_as_enabled_when_there_is_no_resource() public method

public it_sets_code_as_enabled_when_there_is_no_resource ( Symfony\Component\Form\FormEvent $event, Symfony\Component\Form\FormInterface $form )
$event Symfony\Component\Form\FormEvent
$form Symfony\Component\Form\FormInterface

it_subscribes_to_event() public method

it_throws_exception_when_resource_does_not_implement_code_aware_interface() public method

public it_throws_exception_when_resource_does_not_implement_code_aware_interface ( Symfony\Component\Form\FormEvent $event, $object )
$event Symfony\Component\Form\FormEvent