You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 3 година
1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Lc\CaracoleBundle\Field\Address;
  3. use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
  5. use Lc\CaracoleBundle\Form\Address\AddressType;
  6. /**
  7. * @author La clic ! <contact@laclic.fr>
  8. */
  9. final class AddressField implements FieldInterface
  10. {
  11. use FieldTrait;
  12. public static function new(string $propertyName, ?string $label = null): self
  13. {
  14. return (new self())
  15. ->hideOnIndex()
  16. ->setProperty($propertyName)
  17. ->setLabel($label)
  18. //->setTemplatePath('@LcSov/adminlte/crud/field/toggle.html.twig')
  19. ->setFormType(AddressType::class);
  20. }
  21. }