Skip to content

Commit

Permalink
bug #1403 don't access view for forms used in custom views (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

don't access view for forms used in custom views

When you create custom actions and use a form type based on the `EasyAdminFormType`, `$entityConfig[$view]` will not be set.

This is similar to the fix in #1393.

Commits
-------

6fceb5e don't access view for forms used in custom views
  • Loading branch information
javiereguiluz committed Nov 23, 2016
2 parents 58ad5e5 + 6fceb5e commit 904f70c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Form/Type/EasyAdminFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$entity = $options['entity'];
$view = $options['view'];
$entityConfig = $this->configManager->getEntityConfig($entity);
$entityProperties = $entityConfig[$view]['fields'];
$entityProperties = isset($entityConfig[$view]['fields']) ? $entityConfig[$view]['fields'] : array();
$formGroups = array();
$currentFormGroup = null;

Expand Down

0 comments on commit 904f70c

Please sign in to comment.