Download the PHP package ewll/crud-bundle without Composer
On this page you can find all versions of the php package ewll/crud-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package crud-bundle
Ewll/CrudBundle
Installation
Add to packages configuration:
config/bundles.php
config/routes.yaml
Units
Ewll\CrudBundle\Unit\UnitInterface
public function setUserProvider(UserProviderInterface $userProvider): void
This function allows to inject mechanism of getting user inside unit.
public function getUnitName(): string
The main name for URL. Must be unique of all other utits.
public function getEntityClass(): string
The main entity class.
public function getSourceClassName(): string
Class name of class implemented Ewll\CrudBundle\Source\SourceInterface allows access to entity storage.
public function getAccessRuleClassName(): ?string
Class name of ewll/user-bundle AccessRule class implemented Ewll\UserBundle\AccessRule\AccessRuleInterface.
public function getAccessConditions(string $action): array
Must returns array of Access Conditions.
public function getCustomActions(): array
Must returns array of Custom Actions class names.
Ewll\CrudBundle\Unit\CreateMethodInterface
Allows to create entities by request: POST /crud/{unitName}
public function getCreateFormConfig(): FormConfig
Set Form Config for entity creation.
public function getMutationsOnCreate(object $entity): array
Returns array of fields with new values. This method calls before storing.
public function onCreate(object $entity, array $formData): void
Some actions inside transaction within INSERT.
public function getCreateExtraData(object $entity): array
Some data you need to see in Response after success creation.
Ewll\CrudBundle\Unit\UpdateeMethodInterface
Ewll\CrudBundle\Unit\ReadMethodInterface
Ewll\CrudBundle\Unit\DeleteMethodInterface
Access Conditions
@TODO
Custom Actions
@TODO
Form Config
Ewll\CrudBundle\Form\FormConfig
This is some wrapper for Symfony Form Building
Read Transformers
Use read transformers to transform data into views.
- You can use our common read transformers from
Ewll\CrudBundle\ReadViewCompiler\Transformer. - Or create your:
In order to create transformer you need to create two classes inApp\Crud\Transformer.
- Implement
Ewll\CrudBundle\ReadViewCompiler\Transformer\ViewTransformerInitializerInterface. Use abstract classEwll\CrudBundle\ReadViewCompiler\Transformer\ViewTransformerInitializerInterface. This class is needed to define transformer parameters. You will put it into Unit methodsgetReadListFields()andgetReadOneFields(). - Implement
Ewll\CrudBundle\ReadViewCompiler\Transformer\ViewTransformerInterface. Make it as service with tagcrud_view_transformer.
All versions of crud-bundle with dependencies
ext-json Version *
symfony/form Version ^5
symfony/validator Version ^5
symfony/framework-bundle Version ^5
symfony/translation Version ^5