mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
bootstrap api and apply on accompanying period
This commit is contained in:
@@ -33,6 +33,7 @@ class AbstractCRUDController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the complete FQDN of the class
|
||||
*
|
||||
* @return string the complete fqdn of the class
|
||||
*/
|
||||
@@ -42,7 +43,7 @@ class AbstractCRUDController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* called on post fetch entity
|
||||
*/
|
||||
protected function onPostFetchEntity(string $action, Request $request, $entity, $_format): ?Response
|
||||
{
|
||||
@@ -50,14 +51,13 @@ class AbstractCRUDController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Called on post check ACL
|
||||
*/
|
||||
protected function onPostCheckACL(string $action, Request $request, $entity, $_format): ?Response
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* check the acl. Called by every action.
|
||||
*
|
||||
@@ -74,12 +74,20 @@ class AbstractCRUDController extends AbstractController
|
||||
$this->denyAccessUnlessGranted($this->getRoleFor($action, $request, $entity, $_format), $entity);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string the crud name
|
||||
*/
|
||||
protected function getCrudName(): string
|
||||
{
|
||||
return $this->crudConfig['name'];
|
||||
}
|
||||
|
||||
protected function getActionConfig(string $action)
|
||||
{
|
||||
return $this->crudConfig['actions'][$action];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Set the crud configuration
|
||||
*
|
||||
@@ -87,7 +95,6 @@ class AbstractCRUDController extends AbstractController
|
||||
*/
|
||||
public function setCrudConfig(array $config): void
|
||||
{
|
||||
dump($config);
|
||||
$this->crudConfig = $config;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user