shopware / docs

Shopware 6 developer docs
https://developer.shopware.com/
50 stars 252 forks source link

Add #[IsFlowEventAware] when defining a new Aware interface #1492

Open applifaction opened 1 week ago

applifaction commented 1 week ago

#[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();

    ...
}
Isengo1989 commented 3 days ago

@applifaction what is meant by "in the code sample for defining a new "Aware" interface" - can you link the existing part in docs where this should be added?

applifaction commented 3 days ago

Interfaces which extend FlowEventAware like TagAware

Isengo1989 commented 3 days ago

Ok, got it, thx for feedback.