Create the HookableComponent trait

This commit is contained in:
Jacob Tobiasz 2024-02-06 13:34:47 +01:00
parent 4906081bd9
commit ecc255e8d9
No known key found for this signature in database
GPG key ID: 3F84290201B006E0

View file

@ -0,0 +1,36 @@
<?php
/*
* This file is part of the Sylius package.
*
* (c) Sylius Sp. z o.o.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Sylius\Bundle\AdminBundle\TwigComponent;
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
trait HookableComponentTrait
{
#[LiveProp(fieldName: 'parent_main_hook')]
#[ExposeInTemplate(name: 'parent_main_hook')]
public ?string $parentMainHook = null;
#[LiveProp(fieldName: 'parent_fallback_hook')]
#[ExposeInTemplate(name: 'parent_fallback_hook')]
public ?string $parentFallbackHook = null;
#[LiveProp(fieldName: 'hookable_data')]
#[ExposeInTemplate(name: 'hookable_data')]
public mixed $hookableData = null;
#[LiveProp(fieldName: 'hookable_configuration')]
#[ExposeInTemplate(name: 'hookable_configuration')]
public mixed $hookableConfiguration = null;
}