mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
relation and relationship entities created + endpoints. Still something wrong with link between Relation and Relationship
This commit is contained in:
@@ -587,7 +587,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
],
|
||||
'findAccompanyingPeriodsByPerson' => [
|
||||
'path' => '/by-person/{person_id}.{_format}',
|
||||
'controller_action' => 'findAccompanyingPeriodsByPerson',
|
||||
'controller_action' => 'getAccompanyingPeriodsByPerson',
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
@@ -870,6 +870,41 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
],
|
||||
]
|
||||
],
|
||||
[
|
||||
'class' => \Chill\PersonBundle\Entity\Relationships\Relationship::class,
|
||||
'controller' => \Chill\PersonBundle\Controller\RelationshipApiController::class,
|
||||
'name' => 'relationship_by_person',
|
||||
'base_path' => '/api/1.0/relations/relationship',
|
||||
'base_role' => 'ROLE_USER',
|
||||
'actions' => [
|
||||
'_entity' => [
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
Request::METHOD_POST => true,
|
||||
Request::METHOD_PATCH => true
|
||||
],
|
||||
'roles' => [
|
||||
Request::METHOD_GET => 'ROLE_USER',
|
||||
Request::METHOD_HEAD => 'ROLE_USER',
|
||||
Request::METHOD_POST => 'ROLE_USER',
|
||||
Request::METHOD_PATCH => 'ROLE_USER'
|
||||
]
|
||||
],
|
||||
'relationship-by-person' => [
|
||||
'path' => '/by-person/{person_id}.json',
|
||||
'controller_action' => 'getRelationshipsByPerson',
|
||||
'methods' => [
|
||||
Request::METHOD_GET => true,
|
||||
Request::METHOD_HEAD => true,
|
||||
],
|
||||
'roles' => [
|
||||
Request::METHOD_GET => 'ROLE_USER',
|
||||
Request::METHOD_HEAD => 'ROLE_USER',
|
||||
]
|
||||
],
|
||||
]
|
||||
]
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user