docs icon indicating copy to clipboard operation
docs copied to clipboard

Add #[IsFlowEventAware] when defining a new Aware interface

Open applifaction opened this issue 1 year ago • 0 comments

#[IsFlowEventAware] should be added in the code sample for defining a new "Aware" interface:

See "### Create new Aware interface" in https://github.com/shopware/docs/blob/main/guides/plugins/plugins/framework/flow/add-flow-builder-action.md?plain=1

// <plugin root>/src/Core/Framework/Event/TagAware.php
<?php declare(strict_types=1);
namespace Swag\ExamplePlugin\Core\Framework\Event;
use Shopware\Core\Framework\Event\FlowEventAware;

#[IsFlowEventAware]
interface TagAware extends FlowEventAware
{
    ...

    public const TAG = 'tag';

    public const TAG_ID = 'tagId';

    public function getTag();

    ...
}

applifaction avatar Sep 23 '24 08:09 applifaction