wip: integrate with easy admin bundle
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Admin\Field;
|
||||
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
|
||||
|
||||
class JsonDataField implements FieldInterface
|
||||
{
|
||||
use FieldTrait;
|
||||
|
||||
public static function new(string $propertyName, ?string $label = null): self
|
||||
{
|
||||
return (new self())
|
||||
->setProperty($propertyName)
|
||||
->setLabel($label)
|
||||
->setTemplatePath('admin/field/json.html.twig');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user