mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
complete missing annotations
This commit is contained in:
parent
eae13ac3d8
commit
03cafbf4c6
@ -23,7 +23,10 @@ use Chill\PersonBundle\Entity\Person;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
|
||||
/**
|
||||
* Class EntityPersonCRUDController
|
||||
* CRUD Controller for entities attached to a Person
|
||||
*
|
||||
* @package Chill\PersonBundle\CRUD\Controller
|
||||
*/
|
||||
class EntityPersonCRUDController extends CRUDController
|
||||
{
|
||||
@ -59,6 +62,11 @@ class EntityPersonCRUDController extends CRUDController
|
||||
return $person;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Chill\MainBundle\CRUD\Controller\string|string $action
|
||||
* @param Request $request
|
||||
* @return object
|
||||
*/
|
||||
protected function createEntity($action, Request $request): object
|
||||
{
|
||||
$entity = parent::createEntity($action, $request);
|
||||
@ -70,6 +78,14 @@ class EntityPersonCRUDController extends CRUDController
|
||||
return $entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $action
|
||||
* @param mixed $entity
|
||||
* @param Request $request
|
||||
* @param array $defaultTemplateParameters
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function generateTemplateParameter(string $action, $entity, Request $request, array $defaultTemplateParameters = array()): array
|
||||
{
|
||||
$person = $this->getPerson($request);
|
||||
@ -88,6 +104,12 @@ class EntityPersonCRUDController extends CRUDController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $action
|
||||
* @param mixed $entity
|
||||
* @param Request $request
|
||||
* @return string
|
||||
*/
|
||||
protected function getTemplateFor($action, $entity, Request $request)
|
||||
{
|
||||
if ($this->hasCustomTemplate($action, $entity, $request)) {
|
||||
@ -110,6 +132,13 @@ class EntityPersonCRUDController extends CRUDController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $action
|
||||
* @param mixed $entity
|
||||
* @param \Symfony\Component\Form\FormInterface $form
|
||||
* @param Request $request
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
*/
|
||||
protected function onBeforeRedirectAfterSubmission(string $action, $entity, \Symfony\Component\Form\FormInterface $form, Request $request)
|
||||
{
|
||||
$next = $request->request->get("submit", "save-and-close");
|
||||
|
@ -30,14 +30,20 @@ use Chill\MainBundle\Security\Authorization\ChillExportVoter;
|
||||
use Chill\PersonBundle\Doctrine\DQL\AddressPart;
|
||||
|
||||
/**
|
||||
* This is the class that loads and manages your bundle configuration
|
||||
* Class ChillPersonExtension
|
||||
* Loads and manages your bundle configuration
|
||||
*
|
||||
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
|
||||
* @package Chill\PersonBundle\DependencyInjection
|
||||
*/
|
||||
class ChillPersonExtension extends Extension implements PrependExtensionInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @param array $configs
|
||||
* @param ContainerBuilder $container
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
@ -79,6 +85,10 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ContainerBuilder $container
|
||||
* @param $config
|
||||
*/
|
||||
private function handlePersonFieldsParameters(ContainerBuilder $container, $config)
|
||||
{
|
||||
if (array_key_exists('enabled', $config)) {
|
||||
@ -99,6 +109,10 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ContainerBuilder $container
|
||||
* @param $config
|
||||
*/
|
||||
private function handleAccompanyingPeriodsFieldsParameters(ContainerBuilder $container, $config)
|
||||
{
|
||||
$container->setParameter('chill_person.accompanying_period_fields', $config);
|
||||
@ -113,7 +127,11 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ContainerBuilder $container
|
||||
* @throws MissingBundleException
|
||||
*/
|
||||
private function declarePersonAsCustomizable (ContainerBuilder $container)
|
||||
{
|
||||
$bundles = $container->getParameter('kernel.bundles');
|
||||
@ -130,6 +148,10 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ContainerBuilder $container
|
||||
* @throws MissingBundleException
|
||||
*/
|
||||
public function prepend(ContainerBuilder $container)
|
||||
{
|
||||
$this->prependRoleHierarchy($container);
|
||||
@ -166,7 +188,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Add a widget "add a person" on the homepage, automatically
|
||||
*
|
||||
* @param \Chill\PersonBundle\DependencyInjection\containerBuilder $container
|
||||
@ -234,6 +255,9 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ContainerBuilder $container
|
||||
*/
|
||||
protected function prependCruds(ContainerBuilder $container)
|
||||
{
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
|
Loading…
x
Reference in New Issue
Block a user