PHP Class WellCommerce\Bundle\CoreBundle\Form\AbstractFormBuilder

Author: Adam Piotrowski ([email protected])
Inheritance: extends WellCommerce\Bundle\CoreBundle\DependencyInjection\AbstractContainerAware, implements WellCommerce\Component\Form\FormBuilderInterface
Show file Open project: wellcommerce/wellcommerce

Protected Properties

Property Type Description
$alias string
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$formHandler WellCommerce\Component\Form\Handler\FormHandlerInterface
$resolverFactory WellCommerce\Component\Form\Resolver\FormResolverFactoryInterface

Public Methods

Method Description
__construct ( string $alias, WellCommerce\Component\Form\Resolver\FormResolverFactoryInterface $resolverFactory, WellCommerce\Component\Form\Handler\FormHandlerInterface $formHandler, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher ) AbstractFormBuilder constructor.
createForm ( array $options, $defaultData = null ) : WellCommerce\Component\Form\Elements\FormInterface
getDependency ( string $alias, array $options = [] ) : WellCommerce\Component\Form\Dependencies\DependencyInterface
getElement ( string $alias, array $options = [] ) : WellCommerce\Component\Form\Elements\ElementInterface
getFilter ( string $alias, array $options = [] ) : WellCommerce\Component\Form\Filters\FilterInterface
getRepositoryTransformer ( string $alias, WellCommerce\Bundle\DoctrineBundle\Repository\RepositoryInterface $repository ) : WellCommerce\Component\Form\DataTransformer\DataTransformerInterface
getRule ( string $alias, array $options = [] ) : WellCommerce\Component\Form\Rules\RuleInterface

Protected Methods

Method Description
addMetadataFieldset ( WellCommerce\Component\Form\Elements\FormInterface $form, WellCommerce\Bundle\DoctrineBundle\Repository\RepositoryInterface $repository )
addShopsFieldset ( WellCommerce\Component\Form\Elements\FormInterface $form )
buildForm ( WellCommerce\Component\Form\Elements\FormInterface $form ) Builds the form
dispatchOnInitEvent ( WellCommerce\Component\Form\Elements\FormInterface $form, WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface $entity = null ) Dispatches the event after form initialization
getFormService ( array $options ) : WellCommerce\Component\Form\Elements\FormInterface Initializes form service
initService ( string $type, string $alias, array $options ) : object Initializes a service by its type

Method Details

__construct() public method

AbstractFormBuilder constructor.
public __construct ( string $alias, WellCommerce\Component\Form\Resolver\FormResolverFactoryInterface $resolverFactory, WellCommerce\Component\Form\Handler\FormHandlerInterface $formHandler, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher )
$alias string
$resolverFactory WellCommerce\Component\Form\Resolver\FormResolverFactoryInterface
$formHandler WellCommerce\Component\Form\Handler\FormHandlerInterface
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface

addMetadataFieldset() protected method

protected addMetadataFieldset ( WellCommerce\Component\Form\Elements\FormInterface $form, WellCommerce\Bundle\DoctrineBundle\Repository\RepositoryInterface $repository )
$form WellCommerce\Component\Form\Elements\FormInterface
$repository WellCommerce\Bundle\DoctrineBundle\Repository\RepositoryInterface

addShopsFieldset() protected method

protected addShopsFieldset ( WellCommerce\Component\Form\Elements\FormInterface $form )
$form WellCommerce\Component\Form\Elements\FormInterface

buildForm() abstract protected method

Builds the form
abstract protected buildForm ( WellCommerce\Component\Form\Elements\FormInterface $form )
$form WellCommerce\Component\Form\Elements\FormInterface

createForm() public method

public createForm ( array $options, $defaultData = null ) : WellCommerce\Component\Form\Elements\FormInterface
$options array
return WellCommerce\Component\Form\Elements\FormInterface

dispatchOnInitEvent() protected method

Dispatches the event after form initialization
protected dispatchOnInitEvent ( WellCommerce\Component\Form\Elements\FormInterface $form, WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface $entity = null )
$form WellCommerce\Component\Form\Elements\FormInterface
$entity WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface

getDependency() public method

public getDependency ( string $alias, array $options = [] ) : WellCommerce\Component\Form\Dependencies\DependencyInterface
$alias string
$options array
return WellCommerce\Component\Form\Dependencies\DependencyInterface

getElement() public method

public getElement ( string $alias, array $options = [] ) : WellCommerce\Component\Form\Elements\ElementInterface
$alias string
$options array
return WellCommerce\Component\Form\Elements\ElementInterface

getFilter() public method

public getFilter ( string $alias, array $options = [] ) : WellCommerce\Component\Form\Filters\FilterInterface
$alias string
$options array
return WellCommerce\Component\Form\Filters\FilterInterface

getFormService() protected method

Initializes form service
protected getFormService ( array $options ) : WellCommerce\Component\Form\Elements\FormInterface
$options array
return WellCommerce\Component\Form\Elements\FormInterface

getRepositoryTransformer() public method

public getRepositoryTransformer ( string $alias, WellCommerce\Bundle\DoctrineBundle\Repository\RepositoryInterface $repository ) : WellCommerce\Component\Form\DataTransformer\DataTransformerInterface
$alias string
$repository WellCommerce\Bundle\DoctrineBundle\Repository\RepositoryInterface
return WellCommerce\Component\Form\DataTransformer\DataTransformerInterface

getRule() public method

public getRule ( string $alias, array $options = [] ) : WellCommerce\Component\Form\Rules\RuleInterface
$alias string
$options array
return WellCommerce\Component\Form\Rules\RuleInterface

initService() protected method

Initializes a service by its type
protected initService ( string $type, string $alias, array $options ) : object
$type string
$alias string
$options array
return object

Property Details

$alias protected property

protected string $alias
return string

$eventDispatcher protected property

protected EventDispatcherInterface,Symfony\Component\EventDispatcher $eventDispatcher
return Symfony\Component\EventDispatcher\EventDispatcherInterface

$formHandler protected property

protected FormHandlerInterface,WellCommerce\Component\Form\Handler $formHandler
return WellCommerce\Component\Form\Handler\FormHandlerInterface

$resolverFactory protected property

protected FormResolverFactoryInterface,WellCommerce\Component\Form\Resolver $resolverFactory
return WellCommerce\Component\Form\Resolver\FormResolverFactoryInterface