lean-api/src/Attribute/Action/ValueSet.php
Dave M 9b360c4010 - Added a new ArrayCollection
- Changed Action attribute and transformed it into an abstract class
2026-07-14 14:44:30 +00:00

17 lines
439 B
PHP

<?php
namespace Lean\Api\Attribute\Action;
use Picea\Ui\Method\FormContextInterface;
use Ulmus\Entity\EntityInterface;
#[\Attribute(\Attribute::TARGET_PROPERTY)]
class ValueSet extends \Lean\Api\Attribute\Action
{
public function action(EntityInterface $entity, string $key, FormContextInterface $context, string $field): ActionTypeEnum
{
$entity->$key = $context->$field;
return ActionTypeEnum::Setter;
}
}