EasyAdminBundle
EasyAdminBundle copied to clipboard
Add hideIf() feature
Short description of what this feature will allow to do: Rather than hide a field based on a page, user can create a custom way to determine whether the field should be hidden or not!
Example of how to use this feature
yield TextField::new('property')
->hideIf(function($entity) {
return !$entity->hasRequiredProperty();
});
;
I 💯 support this feature !
It seems like something similar can be done like this:
$entityInstance = $this->getContext()->getEntity()->getInstance();
if ($entityInstance->hasRequiredProperty()) {
yield TextField::new('property');
}
It seems like something similar can be done like this:
$entityInstance = $this->getContext()->getEntity()->getInstance();
if ($entityInstance->hasRequiredProperty()) { yield TextField::new('property'); }
Not working with embedded controllers