Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Field/ArrayField.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Config\Asset;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class ArrayField implements FieldInterface
final class ArrayField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/AssociationField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class AssociationField implements FieldInterface
final class AssociationField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/AvatarField.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Config\Option\Size;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class AvatarField implements FieldInterface
final class AvatarField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/BooleanField.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

use EasyCorp\Bundle\EasyAdminBundle\Config\Asset;
use EasyCorp\Bundle\EasyAdminBundle\Config\Option\TextAlign;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class BooleanField implements FieldInterface
final class BooleanField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/ChoiceField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class ChoiceField implements FieldInterface
final class ChoiceField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/CodeEditorField.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Config\Asset;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\CodeEditorType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class CodeEditorField implements FieldInterface
final class CodeEditorField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/CollectionField.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Config\Asset;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class CollectionField implements FieldInterface
final class CollectionField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/ColorField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\ColorType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class ColorField implements FieldInterface
final class ColorField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/CountryField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class CountryField implements FieldInterface
final class CountryField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/CurrencyField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\CurrencyType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class CurrencyField implements FieldInterface
final class CurrencyField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/DateField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class DateField implements FieldInterface
final class DateField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/DateTimeField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class DateTimeField implements FieldInterface
final class DateTimeField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/EmailField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class EmailField implements FieldInterface
final class EmailField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class Field implements FieldInterface
final class Field implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
5 changes: 5 additions & 0 deletions src/Field/FieldTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,9 @@ public function getAsDto(): FieldDto
{
return $this->dto;
}

public function setIcon(?string $iconCssClass, string $invokingMethod = 'FormField::setIcon()'): self
{
return $this;
}
}
6 changes: 3 additions & 3 deletions src/Field/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormColumnOpenType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormFieldsetOpenType;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\Layout\EaFormRowType;
Expand All @@ -13,7 +13,7 @@
/**
* @author Javier Eguiluz <[email protected]>
*/
final class FormField implements FieldInterface
final class FormField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down Expand Up @@ -142,7 +142,7 @@ public static function addColumn(int|string $cols = 'col', TranslatableInterface
->setValue(true);
}

public function setIcon(string $iconCssClass): self
public function setIcon(?string $iconCssClass, string $invokingMethod = 'FormField::setIcon()'): self
{
$this->setCustomOption(self::OPTION_ICON, $iconCssClass);

Expand Down
4 changes: 2 additions & 2 deletions src/Field/HiddenField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class HiddenField implements FieldInterface
final class HiddenField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/IdField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class IdField implements FieldInterface
final class IdField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/ImageField.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use EasyCorp\Bundle\EasyAdminBundle\Config\Asset;
use EasyCorp\Bundle\EasyAdminBundle\Config\Option\TextAlign;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\FileUploadType;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\Image;
Expand All @@ -13,7 +13,7 @@
/**
* @author Javier Eguiluz <[email protected]>
*/
final class ImageField implements FieldInterface
final class ImageField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/IntegerField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class IntegerField implements FieldInterface
final class IntegerField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/LanguageField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\LanguageType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class LanguageField implements FieldInterface
final class LanguageField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/LocaleField.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\LocaleType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class LocaleField implements FieldInterface
final class LocaleField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
4 changes: 2 additions & 2 deletions src/Field/MoneyField.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
namespace EasyCorp\Bundle\EasyAdminBundle\Field;

use EasyCorp\Bundle\EasyAdminBundle\Config\Option\TextAlign;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldTraitAwareInterface;
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
use Symfony\Component\Intl\Currencies;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @author Javier Eguiluz <[email protected]>
*/
final class MoneyField implements FieldInterface
final class MoneyField implements FieldTraitAwareInterface
{
use FieldTrait;

Expand Down
Loading
Loading