This document describes the process of Symfony's Easy Admin Bundle, to process the given YAML configuration, with registered ConfigPass classes.
Those ConfigPasses are collections of private methods, which have e.g. action names hardcoded, so you can't reuse the "config auto-magic" for your new actions.
Make ConfigPasses more accessible and reusable. Make it easier to e.g. provide new actions, which also inherit from "form" config and get normalized with default values.
The config passes are registered and get executed in the following order:
Each step iterates over configured entities.
- normalizeEntityConfig:
- Apply label or label is not set, apply the entity name as label
 
 - normalizeViewConfig:
- Applies 
list.dql_filtertosearch.dql_filteror set both to null - Merges views 
['edit', 'form', 'list', 'new', 'search', 'show'](hardcoded!) with default config 
 - Applies 
 - normalizePropertyConfig:
- Process 
fieldsin views['form', 'edit', 'list', 'new', 'search', 'show'](hardcoded!)- check if field is string or array
- if is array check if property is set, throws exception if not
 - if is string create array with property set with string value
 
 - check if 
typein field is image (setbase_pathtoimage_base_paththen) - check if 
typein field is file (setbase_pathtofile_base_paththen) - set field name to 
property, or ifpropertyis null, apply_easyadmin_form_design_element_with iterator as field name 
 - check if field is string or array
 
 - Process 
 - normalizeFormDesignConfig:
- Process 
fieldsin views['form', 'edit', 'new'](hardcoded!)- check if field is "formDesignElement" (property=null, type set)
 - check for tab first, later also for group, divider and section
 
 
 - Process 
 - normalizeActionConfig:
- First, processes the views 
['edit', 'list', 'new', 'show', 'form'](hardcoded!) and setactionsin each view to empty array, if not given. - Then iterates over 
entitiesand does the same there (inactions). Ifactionsis set, but no array, an exception is thrown 
 - First, processes the views 
 - normalizeBatchActionConfig:
- Initializes 
list.batch_actions(empty array) if not set - Does the same for 
batch_actionsin each entity - Throws exception if 
batch_actionsis given, but no array 
 - Initializes 
 - normalizeFormConfig:
- Merges 
formwithnewandedit- During merge, fields with prefixed 
'-'get removed 
 - During merge, fields with prefixed 
 
 - Merges 
 - normalizeControllerConfig:
- Checks for given controller (in each entity)
 
 - normalizeTranslationConfig:
- Set 
translation_domainfor each entity to roottranslation_domainconfig value if not set. 
 - Set 
 
- processRtlLanguages:
- When root 
localeis one of these['ar', 'fa', 'he'], setdesign.rtlto true 
 - When root 
 
- builds menu defined in 
design.menu 
- processDisabledActions
- applies root 
disabled_actionsto each entity, if not set 
 - applies root 
 - normalizeActionsConfig
- for hardcoded! views 
['edit', 'list', 'new', 'show'] - set label if empty
 - applies default values to each config
 - first all this apply to configured 
actionson root level. Then it's applied toactionsof each entity. 
 - for hardcoded! views 
 - normalizeBatchActionsConfig
- normalizes 
list.batch_actionsconfig- set btn-danger css class when deleted is given
 
 - does the same for each entity (
entities.example.list.batch_actions) 
 - normalizes 
 - resolveActionInheritance
- for hardcoded! views 
['edit', 'list', 'new', 'show'] - merges 
actionsin each entity with defined default, backend and entity actions - removes actions configured with 
'-' - reorders actions
 
 - for hardcoded! views 
 - resolveBatchActionInheritance
- same like resolveActionInheritance
 - just for 
list.batch_actionsin each entity 
 - processActionsConfig
- for hardcoded! views 
['edit', 'list', 'new', 'show'] - checks each action in each entity, if is valid method name and apply css_class "action-example"
 
 - for hardcoded! views 
 - processBatchActionsConfig
- resolves 
list.batch_actionsin each entity - checks if type is "method" (which is required for batch actions)
 - and check for valid method name
 
 - resolves 
 
- set 
propertiesbased on givenentitiesand Doctrine metadata. - also set 
primary_key_field_name 
- processMetadataConfig
- guesses types and default options in each item in 
entitiesbased on itsproperties 
 - guesses types and default options in each item in 
 - processFieldConfig
- just for actions 
['edit', 'list', 'new', 'search', 'show'] - check for 
virtualproperties - set 
dataTypeto type (for actions['list', 'search', 'show']) - set 
fieldTypeto$originalFieldConfig['type']or$normalizedConfig['fieldType'](for actions['list', 'search', 'show']) - set 
fieldTypeto textarea when still empty - set 
type_options(merges doctrine metadata with own configuration) - set 
formatif empty (\EasyCorp\Bundle\EasyAdminBundle\Configuration\PropertyConfigPass::getFieldFormat) - in list action, when dataType is "boolean", change dataType to "toggle", if it wasn't configured in original field config
 
 - just for actions 
 
- all limited to actions 
['edit', 'list', 'new', 'search', 'show'] - processViewConfig
 - processDefaultFieldsConfig
 - processFieldConfig
 - processPageTitleConfig
 - processMaxResultsConfig (only in 
['list', 'search', 'show']actions) - processSortingConfig (only in 
['list', 'search']actions) 
- processEntityTemplates
- resolve (first) template from configured paths (
entities.example.templates->design.templates-> default) - for 
['list', 'show']actions also apply custom template for each field (if given) 
 - resolve (first) template from configured paths (
 - processDefaultTemplates
- resolve (first) template from 
design.templatesand default paths 
 - resolve (first) template from 
 - processFieldTemplates
- just in 
['list', 'show']actions - assignes templates to each field (e.g. hides primary key field by using template "field_id")
 
 - just in 
 
- processDefaultEntity
- set 
default_entity_nameto first entity in yaml config 
 - set 
 - processDefaultMenuItem
- set 
default_menu_itemto first item withdefault: true 
 - set 
 - processDefaultHomepage
- set 
homepageto default menu item, if given - otherwise route to list action of first configured entity in yaml
 
 - set