Skip to content

Commit

Permalink
Fix few things
Browse files Browse the repository at this point in the history
  • Loading branch information
loic425 committed Aug 30, 2024
1 parent a7c0574 commit 32fdd37
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
17 changes: 14 additions & 3 deletions docs/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ Use this processor on your operation.
namespace App\Entity\Customer;

use App\Sylius\State\Processor\CreateCustomerProcessor;
use Sylius\Resource\Metadata\AsResource;
use Sylius\Resource\Metadata\Create;
use Sylius\Resource\Model\ResourceInterface;

#[Resource]
#[AsResource]
#[Create(processor: CreateCustomerProcessor::class)]
final class BoardGameResource implements ResourceInterface
```
Expand Down Expand Up @@ -109,7 +112,11 @@ Use this processor on your operation.

namespace App\BoardGameBlog\Infrastructure\Sylius\Resource;

#[Resource(
use Sylius\Resource\Metadata\AsResource;
use Sylius\Resource\Metadata\Delete;
use Sylius\Resource\Model\ResourceInterface;

#[AsResource(
alias: 'app.board_game',
section: 'admin',
formType: BoardGameType::class,
Expand All @@ -127,7 +134,11 @@ Note that in this case, you can disable providing data.

namespace App\BoardGameBlog\Infrastructure\Sylius\Resource;

#[Resource(
use Sylius\Resource\Metadata\AsResource;
use Sylius\Resource\Metadata\Delete;
use Sylius\Resource\Model\ResourceInterface;

#[AsResource(
alias: 'app.board_game',
section: 'admin',
formType: BoardGameType::class,
Expand Down
8 changes: 4 additions & 4 deletions docs/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ declare(strict_types=1);
namespace App\Entity;

use Sylius\Resource\Metadata\AsResource;
use Sylius\Resource\Model\ResourceInterface;
use Sylius\Resource\Metadata\Show;
use Sylius\Resource\Model\ResourceInterface;

#[AsResource]
#[Show(repositoryMethod: 'findOneByEmail')]
Expand Down Expand Up @@ -68,8 +68,8 @@ declare(strict_types=1);
namespace App\Entity;

use Sylius\Resource\Metadata\AsResource;
use Sylius\Resource\Model\ResourceInterface;
use Sylius\Resource\Metadata\Show;
use Sylius\Resource\Model\ResourceInterface;

#[AsResource]
#[Show(repositoryMethod: 'findOneByEmail', repositoryArguments: ['email' => "request.attributes.get('email')"])]
Expand Down Expand Up @@ -126,8 +126,8 @@ namespace App\BoardGameBlog\Infrastructure\Sylius\Resource;

use App\BoardGameBlog\Infrastructure\Sylius\State\Provider\BoardGameItemProvider;
use Sylius\Resource\Metadata\AsResource;
use Sylius\Resource\Model\ResourceInterface;
use Sylius\Resource\Metadata\Show;
use Sylius\Resource\Model\ResourceInterface;

#[AsResource]
#[Show(provider: BoardGameItemProvider::class)]
Expand All @@ -152,8 +152,8 @@ namespace App\Entity;

use App\BoardgameBlog\Infrastructure\Sylius\State\Provider\DeleteBoardGameProcessor;
use Sylius\Resource\Metadata\AsResource;
use Sylius\Resource\Model\ResourceInterface;
use Sylius\Resource\Metadata\Delete;
use Sylius\Resource\Model\ResourceInterface;

#[AsResource]
#[Delete(
Expand Down

0 comments on commit 32fdd37

Please sign in to comment.