@@ -11,11 +11,11 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | private $container; |
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * Globals constructor. |
|
| 16 | - * @param ContainerInterface $container |
|
| 17 | - */ |
|
| 18 | - public function __construct(ContainerInterface $container) |
|
| 14 | + /** |
|
| 15 | + * Globals constructor. |
|
| 16 | + * @param ContainerInterface $container |
|
| 17 | + */ |
|
| 18 | + public function __construct(ContainerInterface $container) |
|
| 19 | 19 | { |
| 20 | 20 | $this->container = $container; |
| 21 | 21 | } |
@@ -51,9 +51,9 @@ |
||
| 51 | 51 | $dev_mode = $this->container->getParameter("ribs_admin")["dev_mode"]; |
| 52 | 52 | |
| 53 | 53 | if ($dev_mode === true) { |
| 54 | - $package = "lib/".$this->getPackageDevName($package); |
|
| 54 | + $package = "lib/" . $this->getPackageDevName($package); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - return implode("/", $path)."/../../" . $package; |
|
| 57 | + return implode("/", $path) . "/../../" . $package; |
|
| 58 | 58 | } |
| 59 | 59 | } |
@@ -8,11 +8,11 @@ |
||
| 8 | 8 | |
| 9 | 9 | class PageController extends Controller |
| 10 | 10 | { |
| 11 | - /** |
|
| 12 | - * method to show index page of content management |
|
| 13 | - * @Route("/contents", name="ribsadmin_contents") |
|
| 14 | - * @return Response |
|
| 15 | - */ |
|
| 11 | + /** |
|
| 12 | + * method to show index page of content management |
|
| 13 | + * @Route("/contents", name="ribsadmin_contents") |
|
| 14 | + * @return Response |
|
| 15 | + */ |
|
| 16 | 16 | public function indexAction(): Response |
| 17 | 17 | { |
| 18 | 18 | $navigation = $this->getDoctrine()->getManager()->getRepository("RibsAdminBundle:Navigation")->findAllNavigationPage(); |
@@ -9,11 +9,11 @@ |
||
| 9 | 9 | |
| 10 | 10 | class RenderPageController extends Controller |
| 11 | 11 | { |
| 12 | - /** |
|
| 13 | - * @Route("/page/{url}", name="page", requirements={"url" = "[a-zA-Z0-9\-\_\/]*"}) |
|
| 14 | - * @param string $url |
|
| 15 | - * @return Response |
|
| 16 | - */ |
|
| 12 | + /** |
|
| 13 | + * @Route("/page/{url}", name="page", requirements={"url" = "[a-zA-Z0-9\-\_\/]*"}) |
|
| 14 | + * @param string $url |
|
| 15 | + * @return Response |
|
| 16 | + */ |
|
| 17 | 17 | public function renderPageAction(string $url): Response |
| 18 | 18 | { |
| 19 | 19 | $em = $this->getDoctrine()->getManager(); |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $data = $form->getData(); |
| 46 | 46 | $em->persist($data); |
| 47 | 47 | $em->flush(); |
| 48 | - $this->addFlash("success-flash", "Module ". $data->getTitleTag() . " was edited"); |
|
| 48 | + $this->addFlash("success-flash", "Module " . $data->getTitleTag() . " was edited"); |
|
| 49 | 49 | |
| 50 | 50 | return $this->redirectToRoute("ribsadmin_modules"); |
| 51 | 51 | } |
@@ -11,74 +11,74 @@ |
||
| 11 | 11 | |
| 12 | 12 | class ModuleController extends AbstractController |
| 13 | 13 | { |
| 14 | - /** |
|
| 15 | - * @Route("/modules/", name="ribsadmin_modules") |
|
| 16 | - * @return Response |
|
| 17 | - * function that return a list of all modules |
|
| 18 | - */ |
|
| 19 | - public function List(): Response |
|
| 20 | - { |
|
| 21 | - $em = $this->getDoctrine()->getManager(); |
|
| 14 | + /** |
|
| 15 | + * @Route("/modules/", name="ribsadmin_modules") |
|
| 16 | + * @return Response |
|
| 17 | + * function that return a list of all modules |
|
| 18 | + */ |
|
| 19 | + public function List(): Response |
|
| 20 | + { |
|
| 21 | + $em = $this->getDoctrine()->getManager(); |
|
| 22 | 22 | |
| 23 | - $modules = $em->getRepository(Module::class)->findBy([], ['titleTag' => 'ASC']); |
|
| 23 | + $modules = $em->getRepository(Module::class)->findBy([], ['titleTag' => 'ASC']); |
|
| 24 | 24 | |
| 25 | - return $this->render('@RibsAdmin/modules/list.html.twig', [ |
|
| 26 | - "modules" => $modules, |
|
| 27 | - ]); |
|
| 28 | - } |
|
| 25 | + return $this->render('@RibsAdmin/modules/list.html.twig', [ |
|
| 26 | + "modules" => $modules, |
|
| 27 | + ]); |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * @Route("/modules/edit/{id}", name="ribsadmin_modules_edit") |
|
| 32 | - * @param Request $request |
|
| 33 | - * @param int|null $id |
|
| 34 | - * @return Response |
|
| 35 | - * method to edit a module |
|
| 36 | - */ |
|
| 37 | - public function edit(Request $request, int $id = null): Response |
|
| 38 | - { |
|
| 39 | - $em = $this->getDoctrine()->getManager(); |
|
| 40 | - $module = $em->getRepository(Module::class)->findOneBy(["id" => $id]); |
|
| 41 | - $form = $this->createForm(\PiouPiou\RibsAdminBundle\Form\Module::class, $module); |
|
| 42 | - $form->handleRequest($request); |
|
| 30 | + /** |
|
| 31 | + * @Route("/modules/edit/{id}", name="ribsadmin_modules_edit") |
|
| 32 | + * @param Request $request |
|
| 33 | + * @param int|null $id |
|
| 34 | + * @return Response |
|
| 35 | + * method to edit a module |
|
| 36 | + */ |
|
| 37 | + public function edit(Request $request, int $id = null): Response |
|
| 38 | + { |
|
| 39 | + $em = $this->getDoctrine()->getManager(); |
|
| 40 | + $module = $em->getRepository(Module::class)->findOneBy(["id" => $id]); |
|
| 41 | + $form = $this->createForm(\PiouPiou\RibsAdminBundle\Form\Module::class, $module); |
|
| 42 | + $form->handleRequest($request); |
|
| 43 | 43 | |
| 44 | - if ($form->isSubmitted() && $form->isValid()) { |
|
| 45 | - /** @var Module $data */ |
|
| 46 | - $data = $form->getData(); |
|
| 47 | - $em->persist($data); |
|
| 48 | - $em->flush(); |
|
| 49 | - $this->addFlash("success-flash", "Module ". $data->getTitleTag() . " was edited"); |
|
| 44 | + if ($form->isSubmitted() && $form->isValid()) { |
|
| 45 | + /** @var Module $data */ |
|
| 46 | + $data = $form->getData(); |
|
| 47 | + $em->persist($data); |
|
| 48 | + $em->flush(); |
|
| 49 | + $this->addFlash("success-flash", "Module ". $data->getTitleTag() . " was edited"); |
|
| 50 | 50 | |
| 51 | - return $this->redirectToRoute("ribsadmin_modules"); |
|
| 52 | - } |
|
| 51 | + return $this->redirectToRoute("ribsadmin_modules"); |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - return $this->render("@RibsAdmin/modules/edit.html.twig", [ |
|
| 55 | - "form" => $form->createView(), |
|
| 56 | - "form_errors" => $form->getErrors(), |
|
| 57 | - "module" => $module |
|
| 58 | - ]); |
|
| 59 | - } |
|
| 54 | + return $this->render("@RibsAdmin/modules/edit.html.twig", [ |
|
| 55 | + "form" => $form->createView(), |
|
| 56 | + "form_errors" => $form->getErrors(), |
|
| 57 | + "module" => $module |
|
| 58 | + ]); |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * @Route("/modules/delete/{id}", name="ribsadmin_modules_delete") |
|
| 63 | - * @param Request $request |
|
| 64 | - * @param int $id |
|
| 65 | - * @return RedirectResponse |
|
| 66 | - * method to delete a module |
|
| 67 | - */ |
|
| 68 | - public function delete(Request $request, int $id): RedirectResponse |
|
| 69 | - { |
|
| 70 | - $em = $this->getDoctrine()->getManager(); |
|
| 71 | - $module = $em->getRepository(Module::class)->findOneBy(["id" => $id]); |
|
| 61 | + /** |
|
| 62 | + * @Route("/modules/delete/{id}", name="ribsadmin_modules_delete") |
|
| 63 | + * @param Request $request |
|
| 64 | + * @param int $id |
|
| 65 | + * @return RedirectResponse |
|
| 66 | + * method to delete a module |
|
| 67 | + */ |
|
| 68 | + public function delete(Request $request, int $id): RedirectResponse |
|
| 69 | + { |
|
| 70 | + $em = $this->getDoctrine()->getManager(); |
|
| 71 | + $module = $em->getRepository(Module::class)->findOneBy(["id" => $id]); |
|
| 72 | 72 | |
| 73 | - if ($module) { |
|
| 74 | - $name = $module->getTitle(); |
|
| 75 | - $em->remove($module); |
|
| 76 | - $em->flush(); |
|
| 77 | - $this->addFlash("success-flash", "Module " . $name . " was deleted"); |
|
| 78 | - } else { |
|
| 79 | - $this->addFlash("error-flash", "An error occured, module doesn't found"); |
|
| 80 | - } |
|
| 73 | + if ($module) { |
|
| 74 | + $name = $module->getTitle(); |
|
| 75 | + $em->remove($module); |
|
| 76 | + $em->flush(); |
|
| 77 | + $this->addFlash("success-flash", "Module " . $name . " was deleted"); |
|
| 78 | + } else { |
|
| 79 | + $this->addFlash("error-flash", "An error occured, module doesn't found"); |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | - return $this->redirectToRoute("ribsadmin_modules"); |
|
| 83 | - } |
|
| 82 | + return $this->redirectToRoute("ribsadmin_modules"); |
|
| 83 | + } |
|
| 84 | 84 | } |
@@ -25,24 +25,24 @@ discard block |
||
| 25 | 25 | ->add("packageName", TextType::class, [ |
| 26 | 26 | "label" => "Package name", |
| 27 | 27 | "required" => true, |
| 28 | - "disabled" => true |
|
| 28 | + "disabled" => true |
|
| 29 | 29 | ]) |
| 30 | - ->add("titleTag", TextType::class, [ |
|
| 31 | - "label" => "Title tag", |
|
| 32 | - "required" => true |
|
| 33 | - ]) |
|
| 34 | - ->add("descriptionTag", TextareaType::class, [ |
|
| 35 | - "label" => "Description tag", |
|
| 36 | - "required" => true, |
|
| 37 | - ]) |
|
| 38 | - ->add("url", TextType::class, [ |
|
| 39 | - "label" => "Url", |
|
| 40 | - "required" => true |
|
| 41 | - ]) |
|
| 42 | - ->add("urlAdmin", TextType::class, [ |
|
| 43 | - "label" => "Admin url", |
|
| 44 | - "required" => true |
|
| 45 | - ]) |
|
| 30 | + ->add("titleTag", TextType::class, [ |
|
| 31 | + "label" => "Title tag", |
|
| 32 | + "required" => true |
|
| 33 | + ]) |
|
| 34 | + ->add("descriptionTag", TextareaType::class, [ |
|
| 35 | + "label" => "Description tag", |
|
| 36 | + "required" => true, |
|
| 37 | + ]) |
|
| 38 | + ->add("url", TextType::class, [ |
|
| 39 | + "label" => "Url", |
|
| 40 | + "required" => true |
|
| 41 | + ]) |
|
| 42 | + ->add("urlAdmin", TextType::class, [ |
|
| 43 | + "label" => "Admin url", |
|
| 44 | + "required" => true |
|
| 45 | + ]) |
|
| 46 | 46 | ->add("active", CheckboxType::class, [ |
| 47 | 47 | "label" => "Enable module", |
| 48 | 48 | "attr" => [ |
@@ -50,17 +50,17 @@ discard block |
||
| 50 | 50 | ], |
| 51 | 51 | "required" => false |
| 52 | 52 | ]) |
| 53 | - ->add("displayed", CheckboxType::class, [ |
|
| 54 | - "label" => "Display module in navigation", |
|
| 55 | - "attr" => [ |
|
| 56 | - "class" => "ribs-checkbox switched cxs-2 no-pl" |
|
| 57 | - ], |
|
| 58 | - "required" => false |
|
| 59 | - ]) |
|
| 60 | - ->add('submit', SubmitType::class, [ |
|
| 61 | - 'label' => 'Validate', |
|
| 62 | - 'attr' => [] |
|
| 63 | - ]); |
|
| 53 | + ->add("displayed", CheckboxType::class, [ |
|
| 54 | + "label" => "Display module in navigation", |
|
| 55 | + "attr" => [ |
|
| 56 | + "class" => "ribs-checkbox switched cxs-2 no-pl" |
|
| 57 | + ], |
|
| 58 | + "required" => false |
|
| 59 | + ]) |
|
| 60 | + ->add('submit', SubmitType::class, [ |
|
| 61 | + 'label' => 'Validate', |
|
| 62 | + 'attr' => [] |
|
| 63 | + ]); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public function configureOptions(OptionsResolver $resolver) |
@@ -13,62 +13,62 @@ |
||
| 13 | 13 | |
| 14 | 14 | class ImportModuleCommand extends ContainerAwareCommand |
| 15 | 15 | { |
| 16 | - private $em; |
|
| 16 | + private $em; |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * ImportModuleCommand constructor. |
|
| 20 | - * @param EntityManagerInterface $em |
|
| 21 | - * @param string|null $name |
|
| 22 | - */ |
|
| 23 | - public function __construct(EntityManagerInterface $em, string $name = null) |
|
| 24 | - { |
|
| 25 | - parent::__construct($name); |
|
| 26 | - $this->em = $em; |
|
| 27 | - } |
|
| 18 | + /** |
|
| 19 | + * ImportModuleCommand constructor. |
|
| 20 | + * @param EntityManagerInterface $em |
|
| 21 | + * @param string|null $name |
|
| 22 | + */ |
|
| 23 | + public function __construct(EntityManagerInterface $em, string $name = null) |
|
| 24 | + { |
|
| 25 | + parent::__construct($name); |
|
| 26 | + $this->em = $em; |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - protected function configure() |
|
| 30 | - { |
|
| 31 | - $this |
|
| 32 | - ->setName('ribsadmin:import-module') |
|
| 33 | - ->setDescription('Import a module in ribs admin') |
|
| 34 | - ->addArgument( |
|
| 35 | - 'package-name', |
|
| 36 | - InputArgument::REQUIRED, |
|
| 37 | - 'Name of composer package to import' |
|
| 38 | - ) |
|
| 39 | - ->addArgument( |
|
| 40 | - 'module-name', |
|
| 41 | - InputArgument::REQUIRED, |
|
| 42 | - 'Name of package to display in app' |
|
| 43 | - ) |
|
| 44 | - ; |
|
| 45 | - } |
|
| 29 | + protected function configure() |
|
| 30 | + { |
|
| 31 | + $this |
|
| 32 | + ->setName('ribsadmin:import-module') |
|
| 33 | + ->setDescription('Import a module in ribs admin') |
|
| 34 | + ->addArgument( |
|
| 35 | + 'package-name', |
|
| 36 | + InputArgument::REQUIRED, |
|
| 37 | + 'Name of composer package to import' |
|
| 38 | + ) |
|
| 39 | + ->addArgument( |
|
| 40 | + 'module-name', |
|
| 41 | + InputArgument::REQUIRED, |
|
| 42 | + 'Name of package to display in app' |
|
| 43 | + ) |
|
| 44 | + ; |
|
| 45 | + } |
|
| 46 | 46 | |
| 47 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
| 48 | - { |
|
| 49 | - $pacakge_name = $input->getArgument('package-name'); |
|
| 50 | - $output->writeln("Start composer require " . $pacakge_name); |
|
| 47 | + protected function execute(InputInterface $input, OutputInterface $output) |
|
| 48 | + { |
|
| 49 | + $pacakge_name = $input->getArgument('package-name'); |
|
| 50 | + $output->writeln("Start composer require " . $pacakge_name); |
|
| 51 | 51 | |
| 52 | - $process = new Process("composer require " . $pacakge_name); |
|
| 53 | - $process->run(function ($type, $buffer) { |
|
| 54 | - echo $buffer; |
|
| 55 | - }); |
|
| 52 | + $process = new Process("composer require " . $pacakge_name); |
|
| 53 | + $process->run(function ($type, $buffer) { |
|
| 54 | + echo $buffer; |
|
| 55 | + }); |
|
| 56 | 56 | |
| 57 | - if (!$process->isSuccessful()) { |
|
| 58 | - throw new ProcessFailedException($process); |
|
| 59 | - } |
|
| 57 | + if (!$process->isSuccessful()) { |
|
| 58 | + throw new ProcessFailedException($process); |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - $output->writeln("End composer require " . $pacakge_name); |
|
| 62 | - $output->writeln("Start insertion of module in database " . $pacakge_name); |
|
| 61 | + $output->writeln("End composer require " . $pacakge_name); |
|
| 62 | + $output->writeln("Start insertion of module in database " . $pacakge_name); |
|
| 63 | 63 | |
| 64 | - $module = new Module(); |
|
| 65 | - $module->setPackageName($pacakge_name); |
|
| 66 | - $module->setTitle($input->getArgument('module-name')); |
|
| 67 | - $module->setActive(false); |
|
| 68 | - $module->setDisplayed(true); |
|
| 69 | - $this->em->persist($module); |
|
| 70 | - $this->em->flush(); |
|
| 64 | + $module = new Module(); |
|
| 65 | + $module->setPackageName($pacakge_name); |
|
| 66 | + $module->setTitle($input->getArgument('module-name')); |
|
| 67 | + $module->setActive(false); |
|
| 68 | + $module->setDisplayed(true); |
|
| 69 | + $this->em->persist($module); |
|
| 70 | + $this->em->flush(); |
|
| 71 | 71 | |
| 72 | - $output->writeln("Installation of " . $pacakge_name . " is finished. You have now to configure this module in your administration interface"); |
|
| 73 | - } |
|
| 72 | + $output->writeln("Installation of " . $pacakge_name . " is finished. You have now to configure this module in your administration interface"); |
|
| 73 | + } |
|
| 74 | 74 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $output->writeln("Start composer require " . $pacakge_name); |
| 51 | 51 | |
| 52 | 52 | $process = new Process("composer require " . $pacakge_name); |
| 53 | - $process->run(function ($type, $buffer) { |
|
| 53 | + $process->run(function($type, $buffer) { |
|
| 54 | 54 | echo $buffer; |
| 55 | 55 | }); |
| 56 | 56 | |
@@ -13,316 +13,316 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class Module |
| 15 | 15 | { |
| 16 | - /** |
|
| 17 | - * @var integer |
|
| 18 | - * |
|
| 19 | - * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
| 20 | - * @ORM\Id |
|
| 21 | - * @ORM\GeneratedValue(strategy="IDENTITY") |
|
| 22 | - */ |
|
| 23 | - private $id; |
|
| 24 | - |
|
| 25 | - /** |
|
| 26 | - * @var string |
|
| 27 | - * |
|
| 28 | - * @ORM\Column(name="package_name", type="string", length=255, nullable=false) |
|
| 29 | - */ |
|
| 30 | - private $packageName; |
|
| 31 | - |
|
| 32 | - /** |
|
| 33 | - * @var string |
|
| 34 | - * |
|
| 35 | - * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
| 36 | - */ |
|
| 37 | - private $titleTag; |
|
| 38 | - |
|
| 39 | - /** |
|
| 40 | - * @var string |
|
| 41 | - * |
|
| 42 | - * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
| 43 | - */ |
|
| 44 | - private $descriptionTag; |
|
| 45 | - |
|
| 46 | - /** |
|
| 47 | - * @var string |
|
| 48 | - * |
|
| 49 | - * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
| 50 | - */ |
|
| 51 | - private $title; |
|
| 52 | - |
|
| 53 | - /** |
|
| 54 | - * @var string |
|
| 55 | - * |
|
| 56 | - * @ORM\Column(name="template", type="string", length=255, nullable=true) |
|
| 57 | - */ |
|
| 58 | - private $template; |
|
| 59 | - |
|
| 60 | - /** |
|
| 61 | - * @var string |
|
| 62 | - * |
|
| 63 | - * @ORM\Column(name="url", type="string", length=255, nullable=true) |
|
| 64 | - */ |
|
| 65 | - private $url; |
|
| 66 | - |
|
| 67 | - /** |
|
| 68 | - * @var string |
|
| 69 | - * |
|
| 70 | - * @ORM\Column(name="url_admin", type="string", length=255, nullable=true) |
|
| 71 | - */ |
|
| 72 | - private $urlAdmin; |
|
| 73 | - |
|
| 74 | - /** |
|
| 75 | - * @var boolean |
|
| 76 | - * |
|
| 77 | - * @ORM\Column(name="active", type="boolean", nullable=false) |
|
| 78 | - */ |
|
| 79 | - private $active; |
|
| 80 | - |
|
| 81 | - /** |
|
| 82 | - * @var integer |
|
| 83 | - * |
|
| 84 | - * @ORM\Column(name="`order`", type="integer", nullable=true) |
|
| 85 | - */ |
|
| 86 | - private $order; |
|
| 87 | - |
|
| 88 | - /** |
|
| 89 | - * @var boolean |
|
| 90 | - * |
|
| 91 | - * @ORM\Column(name="displayed", type="boolean", nullable=false) |
|
| 92 | - */ |
|
| 93 | - private $displayed; |
|
| 94 | - |
|
| 95 | - /** |
|
| 96 | - * @var \DateTime |
|
| 97 | - * |
|
| 98 | - * @Gedmo\Timestampable(on="create") |
|
| 99 | - * @ORM\Column(name="creation_date", type="date", nullable=true) |
|
| 100 | - */ |
|
| 101 | - private $creationDate; |
|
| 102 | - |
|
| 103 | - /** |
|
| 104 | - * @var \DateTime |
|
| 105 | - * |
|
| 106 | - * @Gedmo\Timestampable(on="update") |
|
| 107 | - * @ORM\Column(name="update_date", type="date", nullable=true) |
|
| 108 | - */ |
|
| 109 | - private $updateDate; |
|
| 110 | - |
|
| 111 | - /** |
|
| 112 | - * @return int |
|
| 113 | - */ |
|
| 114 | - public function getId(): int |
|
| 115 | - { |
|
| 116 | - return $this->id; |
|
| 117 | - } |
|
| 118 | - |
|
| 119 | - /** |
|
| 120 | - * @param int $id |
|
| 121 | - */ |
|
| 122 | - public function setId(int $id) |
|
| 123 | - { |
|
| 124 | - $this->id = $id; |
|
| 125 | - } |
|
| 126 | - |
|
| 127 | - /** |
|
| 128 | - * @return string |
|
| 129 | - */ |
|
| 130 | - public function getPackageName(): string |
|
| 131 | - { |
|
| 132 | - return $this->packageName; |
|
| 133 | - } |
|
| 134 | - |
|
| 135 | - /** |
|
| 136 | - * @param string $package_name |
|
| 137 | - */ |
|
| 138 | - public function setPackageName(string $package_name) |
|
| 139 | - { |
|
| 140 | - $this->packageName = $package_name; |
|
| 141 | - } |
|
| 142 | - |
|
| 143 | - /** |
|
| 144 | - * @return string |
|
| 145 | - */ |
|
| 146 | - public function getTitleTag(): string |
|
| 147 | - { |
|
| 148 | - return $this->titleTag; |
|
| 149 | - } |
|
| 150 | - |
|
| 151 | - /** |
|
| 152 | - * @param string $titleTag |
|
| 153 | - */ |
|
| 154 | - public function setTitleTag(string $titleTag) |
|
| 155 | - { |
|
| 156 | - $this->titleTag = $titleTag; |
|
| 157 | - } |
|
| 158 | - |
|
| 159 | - /** |
|
| 160 | - * @return string |
|
| 161 | - */ |
|
| 162 | - public function getDescriptionTag(): string |
|
| 163 | - { |
|
| 164 | - return $this->descriptionTag; |
|
| 165 | - } |
|
| 166 | - |
|
| 167 | - /** |
|
| 168 | - * @param string $descriptionTag |
|
| 169 | - */ |
|
| 170 | - public function setDescriptionTag(string $descriptionTag) |
|
| 171 | - { |
|
| 172 | - $this->descriptionTag = $descriptionTag; |
|
| 173 | - } |
|
| 174 | - |
|
| 175 | - /** |
|
| 176 | - * @return string |
|
| 177 | - */ |
|
| 178 | - public function getTitle(): string |
|
| 179 | - { |
|
| 180 | - return $this->title; |
|
| 181 | - } |
|
| 182 | - |
|
| 183 | - /** |
|
| 184 | - * @param string $title |
|
| 185 | - */ |
|
| 186 | - public function setTitle(string $title) |
|
| 187 | - { |
|
| 188 | - $this->title = $title; |
|
| 189 | - } |
|
| 190 | - |
|
| 191 | - /** |
|
| 192 | - * @return string |
|
| 193 | - */ |
|
| 194 | - public function getTemplate(): string |
|
| 195 | - { |
|
| 196 | - return $this->template; |
|
| 197 | - } |
|
| 198 | - |
|
| 199 | - /** |
|
| 200 | - * @param string $template |
|
| 201 | - */ |
|
| 202 | - public function setTemplate(string $template) |
|
| 203 | - { |
|
| 204 | - $this->template = $template; |
|
| 205 | - } |
|
| 206 | - |
|
| 207 | - /** |
|
| 208 | - * @return string |
|
| 209 | - */ |
|
| 210 | - public function getUrl(): ?string |
|
| 211 | - { |
|
| 212 | - return $this->url; |
|
| 213 | - } |
|
| 214 | - |
|
| 215 | - /** |
|
| 216 | - * @param string $url |
|
| 217 | - */ |
|
| 218 | - public function setUrl(string $url) |
|
| 219 | - { |
|
| 220 | - $this->url = $url; |
|
| 221 | - } |
|
| 222 | - |
|
| 223 | - /** |
|
| 224 | - * @return string |
|
| 225 | - */ |
|
| 226 | - public function getUrlAdmin(): ?string |
|
| 227 | - { |
|
| 228 | - return $this->urlAdmin; |
|
| 229 | - } |
|
| 230 | - |
|
| 231 | - /** |
|
| 232 | - * @param string $urlAdmin |
|
| 233 | - */ |
|
| 234 | - public function setUrlAdmin(string $urlAdmin) |
|
| 235 | - { |
|
| 236 | - $this->urlAdmin = $urlAdmin; |
|
| 237 | - } |
|
| 238 | - |
|
| 239 | - /** |
|
| 240 | - * @return boolean |
|
| 241 | - */ |
|
| 242 | - public function getActive(): bool |
|
| 243 | - { |
|
| 244 | - return $this->active; |
|
| 245 | - } |
|
| 246 | - |
|
| 247 | - /** |
|
| 248 | - * @param bool $active |
|
| 249 | - */ |
|
| 250 | - public function setActive(bool $active) |
|
| 251 | - { |
|
| 252 | - $this->active = $active; |
|
| 253 | - } |
|
| 254 | - |
|
| 255 | - /** |
|
| 256 | - * @return int |
|
| 257 | - */ |
|
| 258 | - public function getOrder(): int |
|
| 259 | - { |
|
| 260 | - return $this->order; |
|
| 261 | - } |
|
| 262 | - |
|
| 263 | - /** |
|
| 264 | - * @param int $order |
|
| 265 | - */ |
|
| 266 | - public function setOrder(int $order) |
|
| 267 | - { |
|
| 268 | - $this->order = $order; |
|
| 269 | - } |
|
| 270 | - |
|
| 271 | - /** |
|
| 272 | - * @return bool |
|
| 273 | - */ |
|
| 274 | - public function getDisplayed(): bool |
|
| 275 | - { |
|
| 276 | - return $this->displayed; |
|
| 277 | - } |
|
| 278 | - |
|
| 279 | - /** |
|
| 280 | - * @param bool $displayed |
|
| 281 | - */ |
|
| 282 | - public function setDisplayed(bool $displayed) |
|
| 283 | - { |
|
| 284 | - $this->displayed = $displayed; |
|
| 285 | - } |
|
| 286 | - |
|
| 287 | - /** |
|
| 288 | - * @return \DateTime |
|
| 289 | - */ |
|
| 290 | - public function getCreationDate(): \DateTime |
|
| 291 | - { |
|
| 292 | - return $this->creationDate; |
|
| 293 | - } |
|
| 294 | - |
|
| 295 | - /** |
|
| 296 | - * @param \DateTime $creationDate |
|
| 297 | - */ |
|
| 298 | - public function setCreationDate(\DateTime $creationDate) |
|
| 299 | - { |
|
| 300 | - $this->creationDate = $creationDate; |
|
| 301 | - } |
|
| 302 | - |
|
| 303 | - /** |
|
| 304 | - * @return \DateTime |
|
| 305 | - */ |
|
| 306 | - public function getUpdateDate(): \DateTime |
|
| 307 | - { |
|
| 308 | - return $this->updateDate; |
|
| 309 | - } |
|
| 310 | - |
|
| 311 | - /** |
|
| 312 | - * @param \DateTime $updateDate |
|
| 313 | - */ |
|
| 314 | - public function setUpdateDate(\DateTime $updateDate) |
|
| 315 | - { |
|
| 316 | - $this->updateDate = $updateDate; |
|
| 317 | - } |
|
| 318 | - |
|
| 319 | - public function getFormattedActive() |
|
| 320 | - { |
|
| 321 | - return $this->getActive() ? "Oui" : "Non"; |
|
| 322 | - } |
|
| 323 | - |
|
| 324 | - public function getFormattedDisplayed() |
|
| 325 | - { |
|
| 326 | - return $this->getDisplayed() ? "Oui" : "Non"; |
|
| 327 | - } |
|
| 16 | + /** |
|
| 17 | + * @var integer |
|
| 18 | + * |
|
| 19 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
| 20 | + * @ORM\Id |
|
| 21 | + * @ORM\GeneratedValue(strategy="IDENTITY") |
|
| 22 | + */ |
|
| 23 | + private $id; |
|
| 24 | + |
|
| 25 | + /** |
|
| 26 | + * @var string |
|
| 27 | + * |
|
| 28 | + * @ORM\Column(name="package_name", type="string", length=255, nullable=false) |
|
| 29 | + */ |
|
| 30 | + private $packageName; |
|
| 31 | + |
|
| 32 | + /** |
|
| 33 | + * @var string |
|
| 34 | + * |
|
| 35 | + * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
| 36 | + */ |
|
| 37 | + private $titleTag; |
|
| 38 | + |
|
| 39 | + /** |
|
| 40 | + * @var string |
|
| 41 | + * |
|
| 42 | + * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
| 43 | + */ |
|
| 44 | + private $descriptionTag; |
|
| 45 | + |
|
| 46 | + /** |
|
| 47 | + * @var string |
|
| 48 | + * |
|
| 49 | + * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
| 50 | + */ |
|
| 51 | + private $title; |
|
| 52 | + |
|
| 53 | + /** |
|
| 54 | + * @var string |
|
| 55 | + * |
|
| 56 | + * @ORM\Column(name="template", type="string", length=255, nullable=true) |
|
| 57 | + */ |
|
| 58 | + private $template; |
|
| 59 | + |
|
| 60 | + /** |
|
| 61 | + * @var string |
|
| 62 | + * |
|
| 63 | + * @ORM\Column(name="url", type="string", length=255, nullable=true) |
|
| 64 | + */ |
|
| 65 | + private $url; |
|
| 66 | + |
|
| 67 | + /** |
|
| 68 | + * @var string |
|
| 69 | + * |
|
| 70 | + * @ORM\Column(name="url_admin", type="string", length=255, nullable=true) |
|
| 71 | + */ |
|
| 72 | + private $urlAdmin; |
|
| 73 | + |
|
| 74 | + /** |
|
| 75 | + * @var boolean |
|
| 76 | + * |
|
| 77 | + * @ORM\Column(name="active", type="boolean", nullable=false) |
|
| 78 | + */ |
|
| 79 | + private $active; |
|
| 80 | + |
|
| 81 | + /** |
|
| 82 | + * @var integer |
|
| 83 | + * |
|
| 84 | + * @ORM\Column(name="`order`", type="integer", nullable=true) |
|
| 85 | + */ |
|
| 86 | + private $order; |
|
| 87 | + |
|
| 88 | + /** |
|
| 89 | + * @var boolean |
|
| 90 | + * |
|
| 91 | + * @ORM\Column(name="displayed", type="boolean", nullable=false) |
|
| 92 | + */ |
|
| 93 | + private $displayed; |
|
| 94 | + |
|
| 95 | + /** |
|
| 96 | + * @var \DateTime |
|
| 97 | + * |
|
| 98 | + * @Gedmo\Timestampable(on="create") |
|
| 99 | + * @ORM\Column(name="creation_date", type="date", nullable=true) |
|
| 100 | + */ |
|
| 101 | + private $creationDate; |
|
| 102 | + |
|
| 103 | + /** |
|
| 104 | + * @var \DateTime |
|
| 105 | + * |
|
| 106 | + * @Gedmo\Timestampable(on="update") |
|
| 107 | + * @ORM\Column(name="update_date", type="date", nullable=true) |
|
| 108 | + */ |
|
| 109 | + private $updateDate; |
|
| 110 | + |
|
| 111 | + /** |
|
| 112 | + * @return int |
|
| 113 | + */ |
|
| 114 | + public function getId(): int |
|
| 115 | + { |
|
| 116 | + return $this->id; |
|
| 117 | + } |
|
| 118 | + |
|
| 119 | + /** |
|
| 120 | + * @param int $id |
|
| 121 | + */ |
|
| 122 | + public function setId(int $id) |
|
| 123 | + { |
|
| 124 | + $this->id = $id; |
|
| 125 | + } |
|
| 126 | + |
|
| 127 | + /** |
|
| 128 | + * @return string |
|
| 129 | + */ |
|
| 130 | + public function getPackageName(): string |
|
| 131 | + { |
|
| 132 | + return $this->packageName; |
|
| 133 | + } |
|
| 134 | + |
|
| 135 | + /** |
|
| 136 | + * @param string $package_name |
|
| 137 | + */ |
|
| 138 | + public function setPackageName(string $package_name) |
|
| 139 | + { |
|
| 140 | + $this->packageName = $package_name; |
|
| 141 | + } |
|
| 142 | + |
|
| 143 | + /** |
|
| 144 | + * @return string |
|
| 145 | + */ |
|
| 146 | + public function getTitleTag(): string |
|
| 147 | + { |
|
| 148 | + return $this->titleTag; |
|
| 149 | + } |
|
| 150 | + |
|
| 151 | + /** |
|
| 152 | + * @param string $titleTag |
|
| 153 | + */ |
|
| 154 | + public function setTitleTag(string $titleTag) |
|
| 155 | + { |
|
| 156 | + $this->titleTag = $titleTag; |
|
| 157 | + } |
|
| 158 | + |
|
| 159 | + /** |
|
| 160 | + * @return string |
|
| 161 | + */ |
|
| 162 | + public function getDescriptionTag(): string |
|
| 163 | + { |
|
| 164 | + return $this->descriptionTag; |
|
| 165 | + } |
|
| 166 | + |
|
| 167 | + /** |
|
| 168 | + * @param string $descriptionTag |
|
| 169 | + */ |
|
| 170 | + public function setDescriptionTag(string $descriptionTag) |
|
| 171 | + { |
|
| 172 | + $this->descriptionTag = $descriptionTag; |
|
| 173 | + } |
|
| 174 | + |
|
| 175 | + /** |
|
| 176 | + * @return string |
|
| 177 | + */ |
|
| 178 | + public function getTitle(): string |
|
| 179 | + { |
|
| 180 | + return $this->title; |
|
| 181 | + } |
|
| 182 | + |
|
| 183 | + /** |
|
| 184 | + * @param string $title |
|
| 185 | + */ |
|
| 186 | + public function setTitle(string $title) |
|
| 187 | + { |
|
| 188 | + $this->title = $title; |
|
| 189 | + } |
|
| 190 | + |
|
| 191 | + /** |
|
| 192 | + * @return string |
|
| 193 | + */ |
|
| 194 | + public function getTemplate(): string |
|
| 195 | + { |
|
| 196 | + return $this->template; |
|
| 197 | + } |
|
| 198 | + |
|
| 199 | + /** |
|
| 200 | + * @param string $template |
|
| 201 | + */ |
|
| 202 | + public function setTemplate(string $template) |
|
| 203 | + { |
|
| 204 | + $this->template = $template; |
|
| 205 | + } |
|
| 206 | + |
|
| 207 | + /** |
|
| 208 | + * @return string |
|
| 209 | + */ |
|
| 210 | + public function getUrl(): ?string |
|
| 211 | + { |
|
| 212 | + return $this->url; |
|
| 213 | + } |
|
| 214 | + |
|
| 215 | + /** |
|
| 216 | + * @param string $url |
|
| 217 | + */ |
|
| 218 | + public function setUrl(string $url) |
|
| 219 | + { |
|
| 220 | + $this->url = $url; |
|
| 221 | + } |
|
| 222 | + |
|
| 223 | + /** |
|
| 224 | + * @return string |
|
| 225 | + */ |
|
| 226 | + public function getUrlAdmin(): ?string |
|
| 227 | + { |
|
| 228 | + return $this->urlAdmin; |
|
| 229 | + } |
|
| 230 | + |
|
| 231 | + /** |
|
| 232 | + * @param string $urlAdmin |
|
| 233 | + */ |
|
| 234 | + public function setUrlAdmin(string $urlAdmin) |
|
| 235 | + { |
|
| 236 | + $this->urlAdmin = $urlAdmin; |
|
| 237 | + } |
|
| 238 | + |
|
| 239 | + /** |
|
| 240 | + * @return boolean |
|
| 241 | + */ |
|
| 242 | + public function getActive(): bool |
|
| 243 | + { |
|
| 244 | + return $this->active; |
|
| 245 | + } |
|
| 246 | + |
|
| 247 | + /** |
|
| 248 | + * @param bool $active |
|
| 249 | + */ |
|
| 250 | + public function setActive(bool $active) |
|
| 251 | + { |
|
| 252 | + $this->active = $active; |
|
| 253 | + } |
|
| 254 | + |
|
| 255 | + /** |
|
| 256 | + * @return int |
|
| 257 | + */ |
|
| 258 | + public function getOrder(): int |
|
| 259 | + { |
|
| 260 | + return $this->order; |
|
| 261 | + } |
|
| 262 | + |
|
| 263 | + /** |
|
| 264 | + * @param int $order |
|
| 265 | + */ |
|
| 266 | + public function setOrder(int $order) |
|
| 267 | + { |
|
| 268 | + $this->order = $order; |
|
| 269 | + } |
|
| 270 | + |
|
| 271 | + /** |
|
| 272 | + * @return bool |
|
| 273 | + */ |
|
| 274 | + public function getDisplayed(): bool |
|
| 275 | + { |
|
| 276 | + return $this->displayed; |
|
| 277 | + } |
|
| 278 | + |
|
| 279 | + /** |
|
| 280 | + * @param bool $displayed |
|
| 281 | + */ |
|
| 282 | + public function setDisplayed(bool $displayed) |
|
| 283 | + { |
|
| 284 | + $this->displayed = $displayed; |
|
| 285 | + } |
|
| 286 | + |
|
| 287 | + /** |
|
| 288 | + * @return \DateTime |
|
| 289 | + */ |
|
| 290 | + public function getCreationDate(): \DateTime |
|
| 291 | + { |
|
| 292 | + return $this->creationDate; |
|
| 293 | + } |
|
| 294 | + |
|
| 295 | + /** |
|
| 296 | + * @param \DateTime $creationDate |
|
| 297 | + */ |
|
| 298 | + public function setCreationDate(\DateTime $creationDate) |
|
| 299 | + { |
|
| 300 | + $this->creationDate = $creationDate; |
|
| 301 | + } |
|
| 302 | + |
|
| 303 | + /** |
|
| 304 | + * @return \DateTime |
|
| 305 | + */ |
|
| 306 | + public function getUpdateDate(): \DateTime |
|
| 307 | + { |
|
| 308 | + return $this->updateDate; |
|
| 309 | + } |
|
| 310 | + |
|
| 311 | + /** |
|
| 312 | + * @param \DateTime $updateDate |
|
| 313 | + */ |
|
| 314 | + public function setUpdateDate(\DateTime $updateDate) |
|
| 315 | + { |
|
| 316 | + $this->updateDate = $updateDate; |
|
| 317 | + } |
|
| 318 | + |
|
| 319 | + public function getFormattedActive() |
|
| 320 | + { |
|
| 321 | + return $this->getActive() ? "Oui" : "Non"; |
|
| 322 | + } |
|
| 323 | + |
|
| 324 | + public function getFormattedDisplayed() |
|
| 325 | + { |
|
| 326 | + return $this->getDisplayed() ? "Oui" : "Non"; |
|
| 327 | + } |
|
| 328 | 328 | } |