|
1
|
|
|
<?php |
|
2
|
|
|
declare(strict_types = 1); |
|
3
|
|
|
/** |
|
4
|
|
|
* /src/Resource/RoleResource.php |
|
5
|
|
|
* |
|
6
|
|
|
* @author TLe, Tarmo Leppänen <[email protected]> |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace App\Resource; |
|
10
|
|
|
|
|
11
|
|
|
use App\DTO\RestDtoInterface; |
|
12
|
|
|
use App\Entity\Interfaces\EntityInterface; |
|
13
|
|
|
use App\Entity\Role as Entity; |
|
14
|
|
|
use App\Repository\RoleRepository as Repository; |
|
15
|
|
|
use App\Rest\RestResource; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* Class RoleResource |
|
19
|
|
|
* |
|
20
|
|
|
* @package App\Resource |
|
21
|
|
|
* @author TLe, Tarmo Leppänen <[email protected]> |
|
22
|
|
|
* |
|
23
|
|
|
* @psalm-suppress LessSpecificImplementedReturnType |
|
24
|
|
|
* @codingStandardsIgnoreStart |
|
25
|
|
|
* |
|
26
|
|
|
* @method Entity getReference(string $id) |
|
27
|
|
|
* @method Repository getRepository() |
|
28
|
|
|
* @method Entity[] find(?array $criteria = null, ?array $orderBy = null, ?int $limit = null, ?int $offset = null, ?array $search = null) |
|
29
|
|
|
* @method Entity|null findOne(string $id, ?bool $throwExceptionIfNotFound = null) |
|
30
|
|
|
* @method Entity|null findOneBy(array $criteria, ?array $orderBy = null, ?bool $throwExceptionIfNotFound = null) |
|
31
|
|
|
* @method Entity create(RestDtoInterface $dto, ?bool $flush = null, ?bool $skipValidation = null) |
|
32
|
|
|
* @method Entity update(string $id, RestDtoInterface $dto, ?bool $flush = null, ?bool $skipValidation = null) |
|
33
|
|
|
* @method Entity patch(string $id, RestDtoInterface $dto, ?bool $flush = null, ?bool $skipValidation = null) |
|
34
|
|
|
* @method Entity delete(string $id, ?bool $flush = null) |
|
35
|
|
|
* @method Entity save(EntityInterface $entity, ?bool $flush = null, ?bool $skipValidation = null) |
|
36
|
|
|
* |
|
37
|
|
|
* @codingStandardsIgnoreEnd |
|
38
|
|
|
*/ |
|
39
|
|
|
class RoleResource extends RestResource |
|
40
|
|
|
{ |
|
41
|
189 |
|
public function __construct( |
|
42
|
|
|
Repository $repository, |
|
43
|
|
|
) { |
|
44
|
189 |
|
parent::__construct($repository); |
|
45
|
|
|
} |
|
46
|
|
|
} |
|
47
|
|
|
|