@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
25 | - * method that return all infos needed in access right management page |
|
25 | + * method that return all infos needed in access right management page |
|
26 | 26 | * @return array |
27 | 27 | */ |
28 | 28 | public function getAllInfosModules() |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
47 | - * function that return all modules rights |
|
47 | + * function that return all modules rights |
|
48 | 48 | * @return object |
49 | 49 | */ |
50 | 50 | public function getModuleRights() |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | foreach ($modules as $module) { |
37 | 37 | $modules_data[] = [ |
38 | 38 | "name" => $module->getTitle(), |
39 | - "rights" => (array)json_decode(file_get_contents($this->globals->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/ribsadmin_rights.json")) |
|
39 | + "rights" => (array) json_decode(file_get_contents($this->globals->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/ribsadmin_rights.json")) |
|
40 | 40 | ]; |
41 | 41 | } |
42 | 42 | |
@@ -59,6 +59,6 @@ discard block |
||
59 | 59 | $rights[] = json_decode(file_get_contents($this->globals->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/ribsadmin_rights.json")); |
60 | 60 | } |
61 | 61 | |
62 | - return (object)$rights; |
|
62 | + return (object) $rights; |
|
63 | 63 | } |
64 | 64 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | class Jwt |
8 | 8 | { |
9 | 9 | /** |
10 | - * encode an array in jwt |
|
10 | + * encode an array in jwt |
|
11 | 11 | * @param array $values |
12 | 12 | * @param string $token |
13 | 13 | * @return string |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
21 | - * encode a jwt in array |
|
21 | + * encode a jwt in array |
|
22 | 22 | * @param string $encoded_json |
23 | 23 | * @param string $token |
24 | 24 | * @return bool|object |
@@ -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,64 +13,64 @@ |
||
13 | 13 | |
14 | 14 | class ImportModuleCommand extends Command |
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"); |
|
72 | + $output->writeln("Installation of " . $pacakge_name . " is finished. You have now to configure this module in your administration interface"); |
|
73 | 73 | |
74 | - return 0; |
|
75 | - } |
|
74 | + return 0; |
|
75 | + } |
|
76 | 76 | } |
@@ -7,8 +7,8 @@ |
||
7 | 7 | |
8 | 8 | class RibsAdminBundle extends Bundle |
9 | 9 | { |
10 | - public function getContainerExtension() |
|
11 | - { |
|
12 | - return new RibsAdminExtension(); |
|
13 | - } |
|
10 | + public function getContainerExtension() |
|
11 | + { |
|
12 | + return new RibsAdminExtension(); |
|
13 | + } |
|
14 | 14 | } |
@@ -80,7 +80,7 @@ |
||
80 | 80 | $account->setPassword($temp_password); |
81 | 81 | $account->setUser($user); |
82 | 82 | $account->setEmail($email); |
83 | - $account->setUsername(substr($firstname, 0, 1).".".$lastname); |
|
83 | + $account->setUsername(substr($firstname, 0, 1) . "." . $lastname); |
|
84 | 84 | $this->em->persist($account); |
85 | 85 | |
86 | 86 | $this->em->flush(); |
@@ -13,80 +13,80 @@ |
||
13 | 13 | |
14 | 14 | class CreateAdminCommand extends Command |
15 | 15 | { |
16 | - /** @var EntityManagerInterface */ |
|
17 | - private $em; |
|
16 | + /** @var EntityManagerInterface */ |
|
17 | + private $em; |
|
18 | 18 | |
19 | - /** @var UserPasswordEncoderInterface */ |
|
20 | - private $passwordEncoder; |
|
19 | + /** @var UserPasswordEncoderInterface */ |
|
20 | + private $passwordEncoder; |
|
21 | 21 | |
22 | - /** |
|
23 | - * CreateAdminCommand constructor. |
|
24 | - * @param EntityManagerInterface $em |
|
25 | - * @param UserPasswordEncoderInterface $passwordEncoder |
|
26 | - * @param string|null $name |
|
27 | - */ |
|
28 | - public function __construct(EntityManagerInterface $em, UserPasswordEncoderInterface $passwordEncoder, string $name = null) |
|
29 | - { |
|
30 | - parent::__construct($name); |
|
31 | - $this->em = $em; |
|
32 | - $this->passwordEncoder = $passwordEncoder; |
|
33 | - } |
|
22 | + /** |
|
23 | + * CreateAdminCommand constructor. |
|
24 | + * @param EntityManagerInterface $em |
|
25 | + * @param UserPasswordEncoderInterface $passwordEncoder |
|
26 | + * @param string|null $name |
|
27 | + */ |
|
28 | + public function __construct(EntityManagerInterface $em, UserPasswordEncoderInterface $passwordEncoder, string $name = null) |
|
29 | + { |
|
30 | + parent::__construct($name); |
|
31 | + $this->em = $em; |
|
32 | + $this->passwordEncoder = $passwordEncoder; |
|
33 | + } |
|
34 | 34 | |
35 | - protected function configure() |
|
36 | - { |
|
37 | - $this |
|
38 | - ->setName('ribsadmin:create-admin') |
|
39 | - ->setDescription('Create an admin in ribs admin') |
|
40 | - ->addArgument( |
|
41 | - 'firstname', |
|
42 | - InputArgument::REQUIRED, |
|
43 | - 'Firstname of admin to create' |
|
44 | - ) |
|
45 | - ->addArgument( |
|
46 | - 'lastname', |
|
47 | - InputArgument::REQUIRED, |
|
48 | - 'Lastname of admin to create' |
|
49 | - ) |
|
50 | - ->addArgument( |
|
51 | - 'email', |
|
52 | - InputArgument::REQUIRED, |
|
53 | - 'email of admin to create' |
|
54 | - ) |
|
55 | - ->addArgument( |
|
56 | - 'password', |
|
57 | - InputArgument::REQUIRED, |
|
58 | - 'password of admin to create' |
|
59 | - ) |
|
60 | - ; |
|
61 | - } |
|
35 | + protected function configure() |
|
36 | + { |
|
37 | + $this |
|
38 | + ->setName('ribsadmin:create-admin') |
|
39 | + ->setDescription('Create an admin in ribs admin') |
|
40 | + ->addArgument( |
|
41 | + 'firstname', |
|
42 | + InputArgument::REQUIRED, |
|
43 | + 'Firstname of admin to create' |
|
44 | + ) |
|
45 | + ->addArgument( |
|
46 | + 'lastname', |
|
47 | + InputArgument::REQUIRED, |
|
48 | + 'Lastname of admin to create' |
|
49 | + ) |
|
50 | + ->addArgument( |
|
51 | + 'email', |
|
52 | + InputArgument::REQUIRED, |
|
53 | + 'email of admin to create' |
|
54 | + ) |
|
55 | + ->addArgument( |
|
56 | + 'password', |
|
57 | + InputArgument::REQUIRED, |
|
58 | + 'password of admin to create' |
|
59 | + ) |
|
60 | + ; |
|
61 | + } |
|
62 | 62 | |
63 | - protected function execute(InputInterface $input, OutputInterface $output) |
|
64 | - { |
|
65 | - $firstname = $input->getArgument('firstname'); |
|
66 | - $lastname = $input->getArgument('lastname'); |
|
67 | - $email = $input->getArgument('email'); |
|
68 | - $password = $input->getArgument('password'); |
|
63 | + protected function execute(InputInterface $input, OutputInterface $output) |
|
64 | + { |
|
65 | + $firstname = $input->getArgument('firstname'); |
|
66 | + $lastname = $input->getArgument('lastname'); |
|
67 | + $email = $input->getArgument('email'); |
|
68 | + $password = $input->getArgument('password'); |
|
69 | 69 | |
70 | - $output->writeln("Create admin " . $firstname . " " . $lastname); |
|
70 | + $output->writeln("Create admin " . $firstname . " " . $lastname); |
|
71 | 71 | |
72 | - $user = new User(); |
|
73 | - $user->setFirstname($firstname); |
|
74 | - $user->setLastname($lastname); |
|
75 | - $user->setAccessRights("*"); |
|
76 | - $this->em->persist($user); |
|
72 | + $user = new User(); |
|
73 | + $user->setFirstname($firstname); |
|
74 | + $user->setLastname($lastname); |
|
75 | + $user->setAccessRights("*"); |
|
76 | + $this->em->persist($user); |
|
77 | 77 | |
78 | - $account = new Account(); |
|
79 | - $temp_password = $this->passwordEncoder->encodePassword($account, $password); |
|
80 | - $account->setPassword($temp_password); |
|
81 | - $account->setUser($user); |
|
82 | - $account->setEmail($email); |
|
83 | - $account->setUsername(substr($firstname, 0, 1).".".$lastname); |
|
84 | - $this->em->persist($account); |
|
78 | + $account = new Account(); |
|
79 | + $temp_password = $this->passwordEncoder->encodePassword($account, $password); |
|
80 | + $account->setPassword($temp_password); |
|
81 | + $account->setUser($user); |
|
82 | + $account->setEmail($email); |
|
83 | + $account->setUsername(substr($firstname, 0, 1).".".$lastname); |
|
84 | + $this->em->persist($account); |
|
85 | 85 | |
86 | - $this->em->flush(); |
|
86 | + $this->em->flush(); |
|
87 | 87 | |
88 | - $output->writeln("End Create admin " . $firstname . " " . $lastname); |
|
88 | + $output->writeln("End Create admin " . $firstname . " " . $lastname); |
|
89 | 89 | |
90 | - return 0; |
|
91 | - } |
|
90 | + return 0; |
|
91 | + } |
|
92 | 92 | } |
@@ -8,23 +8,23 @@ |
||
8 | 8 | |
9 | 9 | class AccountTokenRepository extends EntityRepository |
10 | 10 | { |
11 | - /** |
|
12 | - * method to find UserToken to archive |
|
13 | - * @param int $max_inactivation_days |
|
14 | - * @return mixed |
|
15 | - * @throws Exception |
|
16 | - */ |
|
17 | - public function findByExpiredToken(int $max_inactivation_days) |
|
18 | - { |
|
19 | - $now = new \DateTime(); |
|
20 | - $now->sub(new \DateInterval("P" . $max_inactivation_days . "D")); |
|
11 | + /** |
|
12 | + * method to find UserToken to archive |
|
13 | + * @param int $max_inactivation_days |
|
14 | + * @return mixed |
|
15 | + * @throws Exception |
|
16 | + */ |
|
17 | + public function findByExpiredToken(int $max_inactivation_days) |
|
18 | + { |
|
19 | + $now = new \DateTime(); |
|
20 | + $now->sub(new \DateInterval("P" . $max_inactivation_days . "D")); |
|
21 | 21 | |
22 | - $query = $this->getEntityManager()->createQuery("SELECT u FROM App:AccountToken u WHERE |
|
22 | + $query = $this->getEntityManager()->createQuery("SELECT u FROM App:AccountToken u WHERE |
|
23 | 23 | u.endToken < :max_inactivation_days |
24 | 24 | "); |
25 | 25 | |
26 | - $query->setParameter("max_inactivation_days", $now, Type::DATETIME); |
|
26 | + $query->setParameter("max_inactivation_days", $now, Type::DATETIME); |
|
27 | 27 | |
28 | - return $query->getResult(); |
|
29 | - } |
|
28 | + return $query->getResult(); |
|
29 | + } |
|
30 | 30 | } |
@@ -6,91 +6,91 @@ |
||
6 | 6 | |
7 | 7 | trait CreatedUpdatedTrait |
8 | 8 | { |
9 | - /** |
|
10 | - * @ORM\Column(name="created_at", type="datetime", nullable=true) |
|
11 | - */ |
|
12 | - protected $created_at; |
|
9 | + /** |
|
10 | + * @ORM\Column(name="created_at", type="datetime", nullable=true) |
|
11 | + */ |
|
12 | + protected $created_at; |
|
13 | 13 | |
14 | - /** |
|
15 | - * @ORM\ManyToOne(targetEntity="PiouPiou\RibsAdminBundle\Entity\User") |
|
16 | - * @ORM\JoinColumn(name="created_by", referencedColumnName="id", nullable=false) |
|
17 | - */ |
|
18 | - protected $created_by; |
|
14 | + /** |
|
15 | + * @ORM\ManyToOne(targetEntity="PiouPiou\RibsAdminBundle\Entity\User") |
|
16 | + * @ORM\JoinColumn(name="created_by", referencedColumnName="id", nullable=false) |
|
17 | + */ |
|
18 | + protected $created_by; |
|
19 | 19 | |
20 | - /** |
|
21 | - * @ORM\Column(name="updated_at", type="datetime", nullable=true) |
|
22 | - */ |
|
23 | - protected $updated_at; |
|
20 | + /** |
|
21 | + * @ORM\Column(name="updated_at", type="datetime", nullable=true) |
|
22 | + */ |
|
23 | + protected $updated_at; |
|
24 | 24 | |
25 | - /** |
|
26 | - * @ORM\ManyToOne(targetEntity="PiouPiou\RibsAdminBundle\Entity\User") |
|
27 | - * @ORM\JoinColumn(name="updated_by", referencedColumnName="id", nullable=false) |
|
28 | - */ |
|
29 | - protected $updated_by; |
|
25 | + /** |
|
26 | + * @ORM\ManyToOne(targetEntity="PiouPiou\RibsAdminBundle\Entity\User") |
|
27 | + * @ORM\JoinColumn(name="updated_by", referencedColumnName="id", nullable=false) |
|
28 | + */ |
|
29 | + protected $updated_by; |
|
30 | 30 | |
31 | - /** |
|
32 | - * @return mixed |
|
33 | - */ |
|
34 | - public function getCreatedAt() |
|
35 | - { |
|
36 | - return $this->created_at; |
|
37 | - } |
|
31 | + /** |
|
32 | + * @return mixed |
|
33 | + */ |
|
34 | + public function getCreatedAt() |
|
35 | + { |
|
36 | + return $this->created_at; |
|
37 | + } |
|
38 | 38 | |
39 | - /** |
|
40 | - * @param mixed $created_at |
|
41 | - */ |
|
42 | - public function setCreatedAt($created_at) |
|
43 | - { |
|
44 | - $this->created_at = $created_at; |
|
45 | - } |
|
39 | + /** |
|
40 | + * @param mixed $created_at |
|
41 | + */ |
|
42 | + public function setCreatedAt($created_at) |
|
43 | + { |
|
44 | + $this->created_at = $created_at; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @return mixed |
|
49 | - */ |
|
50 | - public function getCreatedBy() |
|
51 | - { |
|
52 | - return $this->created_by; |
|
53 | - } |
|
47 | + /** |
|
48 | + * @return mixed |
|
49 | + */ |
|
50 | + public function getCreatedBy() |
|
51 | + { |
|
52 | + return $this->created_by; |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * @ORM\PrePersist |
|
57 | - * @param mixed $created_by |
|
58 | - */ |
|
59 | - public function setCreatedBy($created_by) |
|
60 | - { |
|
61 | - $this->created_by = $created_by; |
|
62 | - } |
|
55 | + /** |
|
56 | + * @ORM\PrePersist |
|
57 | + * @param mixed $created_by |
|
58 | + */ |
|
59 | + public function setCreatedBy($created_by) |
|
60 | + { |
|
61 | + $this->created_by = $created_by; |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * @return mixed |
|
66 | - */ |
|
67 | - public function getUpdatedAt() |
|
68 | - { |
|
69 | - return $this->updated_at; |
|
70 | - } |
|
64 | + /** |
|
65 | + * @return mixed |
|
66 | + */ |
|
67 | + public function getUpdatedAt() |
|
68 | + { |
|
69 | + return $this->updated_at; |
|
70 | + } |
|
71 | 71 | |
72 | - /** |
|
73 | - * @param mixed $updated_at |
|
74 | - */ |
|
75 | - public function setUpdatedAt($updated_at) |
|
76 | - { |
|
77 | - $this->updated_at = $updated_at; |
|
78 | - } |
|
72 | + /** |
|
73 | + * @param mixed $updated_at |
|
74 | + */ |
|
75 | + public function setUpdatedAt($updated_at) |
|
76 | + { |
|
77 | + $this->updated_at = $updated_at; |
|
78 | + } |
|
79 | 79 | |
80 | - /** |
|
81 | - * @return mixed |
|
82 | - */ |
|
83 | - public function getUpdatedBy() |
|
84 | - { |
|
85 | - return $this->updated_by; |
|
86 | - } |
|
80 | + /** |
|
81 | + * @return mixed |
|
82 | + */ |
|
83 | + public function getUpdatedBy() |
|
84 | + { |
|
85 | + return $this->updated_by; |
|
86 | + } |
|
87 | 87 | |
88 | - /** |
|
89 | - * @ORM\PreUpdate |
|
90 | - * @param mixed $updated_by |
|
91 | - */ |
|
92 | - public function setUpdatedBy($updated_by) |
|
93 | - { |
|
94 | - $this->updated_by = $updated_by; |
|
95 | - } |
|
88 | + /** |
|
89 | + * @ORM\PreUpdate |
|
90 | + * @param mixed $updated_by |
|
91 | + */ |
|
92 | + public function setUpdatedBy($updated_by) |
|
93 | + { |
|
94 | + $this->updated_by = $updated_by; |
|
95 | + } |
|
96 | 96 | } |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | */ |
13 | 13 | class Account implements UserInterface, \Serializable |
14 | 14 | { |
15 | - use GuidTrait; |
|
16 | - use CreatedUpdatedTrait; |
|
15 | + use GuidTrait; |
|
16 | + use CreatedUpdatedTrait; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * @ORM\Id |
@@ -47,16 +47,16 @@ discard block |
||
47 | 47 | */ |
48 | 48 | private $isActive; |
49 | 49 | |
50 | - /** |
|
51 | - * @ORM\Column(type="datetime", nullable=true) |
|
52 | - */ |
|
53 | - protected $last_connection; |
|
50 | + /** |
|
51 | + * @ORM\Column(type="datetime", nullable=true) |
|
52 | + */ |
|
53 | + protected $last_connection; |
|
54 | 54 | |
55 | - /** |
|
56 | - * @ORM\OneToMany(targetEntity="AccountToken", mappedBy="account") |
|
57 | - * @ORM\JoinColumn(name="id", referencedColumnName="account_id", nullable=false) |
|
58 | - */ |
|
59 | - protected $tokens; |
|
55 | + /** |
|
56 | + * @ORM\OneToMany(targetEntity="AccountToken", mappedBy="account") |
|
57 | + * @ORM\JoinColumn(name="id", referencedColumnName="account_id", nullable=false) |
|
58 | + */ |
|
59 | + protected $tokens; |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * @var User |
@@ -187,43 +187,43 @@ discard block |
||
187 | 187 | $this->user = $user; |
188 | 188 | } |
189 | 189 | |
190 | - /** |
|
191 | - * @return mixed |
|
192 | - */ |
|
193 | - public function getLastConnection() |
|
194 | - { |
|
195 | - return $this->last_connection; |
|
196 | - } |
|
190 | + /** |
|
191 | + * @return mixed |
|
192 | + */ |
|
193 | + public function getLastConnection() |
|
194 | + { |
|
195 | + return $this->last_connection; |
|
196 | + } |
|
197 | 197 | |
198 | - /** |
|
199 | - * @param mixed $last_connection |
|
200 | - * @return Account |
|
201 | - */ |
|
202 | - public function setLastConnection($last_connection) |
|
203 | - { |
|
204 | - $this->last_connection = $last_connection; |
|
198 | + /** |
|
199 | + * @param mixed $last_connection |
|
200 | + * @return Account |
|
201 | + */ |
|
202 | + public function setLastConnection($last_connection) |
|
203 | + { |
|
204 | + $this->last_connection = $last_connection; |
|
205 | 205 | |
206 | - return $this; |
|
207 | - } |
|
206 | + return $this; |
|
207 | + } |
|
208 | 208 | |
209 | - /** |
|
210 | - * @return mixed |
|
211 | - */ |
|
212 | - public function getTokens() |
|
213 | - { |
|
214 | - return $this->tokens; |
|
215 | - } |
|
209 | + /** |
|
210 | + * @return mixed |
|
211 | + */ |
|
212 | + public function getTokens() |
|
213 | + { |
|
214 | + return $this->tokens; |
|
215 | + } |
|
216 | 216 | |
217 | - /** |
|
218 | - * @param mixed $tokens |
|
219 | - * @return Account |
|
220 | - */ |
|
221 | - public function setTokens($tokens) |
|
222 | - { |
|
223 | - $this->tokens = $tokens; |
|
217 | + /** |
|
218 | + * @param mixed $tokens |
|
219 | + * @return Account |
|
220 | + */ |
|
221 | + public function setTokens($tokens) |
|
222 | + { |
|
223 | + $this->tokens = $tokens; |
|
224 | 224 | |
225 | - return $this; |
|
226 | - } |
|
225 | + return $this; |
|
226 | + } |
|
227 | 227 | |
228 | 228 | /** |
229 | 229 | * Returns the roles granted to the user. |
@@ -14,297 +14,297 @@ |
||
14 | 14 | */ |
15 | 15 | class Module |
16 | 16 | { |
17 | - use GuidTrait; |
|
18 | - use CreatedUpdatedTrait; |
|
19 | - |
|
20 | - /** |
|
21 | - * @var integer |
|
22 | - * |
|
23 | - * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
24 | - * @ORM\Id |
|
25 | - * @ORM\GeneratedValue(strategy="IDENTITY") |
|
26 | - */ |
|
27 | - private $id; |
|
28 | - |
|
29 | - /** |
|
30 | - * @var string |
|
31 | - * |
|
32 | - * @ORM\Column(name="package_name", type="string", length=255, nullable=false) |
|
33 | - */ |
|
34 | - private $packageName; |
|
35 | - |
|
36 | - /** |
|
37 | - * @var string |
|
38 | - * |
|
39 | - * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
40 | - */ |
|
41 | - private $titleTag; |
|
42 | - |
|
43 | - /** |
|
44 | - * @var string |
|
45 | - * |
|
46 | - * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
47 | - */ |
|
48 | - private $descriptionTag; |
|
49 | - |
|
50 | - /** |
|
51 | - * @var string |
|
52 | - * |
|
53 | - * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
54 | - */ |
|
55 | - private $title; |
|
56 | - |
|
57 | - /** |
|
58 | - * @var string |
|
59 | - * |
|
60 | - * @ORM\Column(name="template", type="string", length=255, nullable=true) |
|
61 | - */ |
|
62 | - private $template; |
|
63 | - |
|
64 | - /** |
|
65 | - * @var string |
|
66 | - * |
|
67 | - * @ORM\Column(name="url", type="string", length=255, nullable=true) |
|
68 | - */ |
|
69 | - private $url; |
|
70 | - |
|
71 | - /** |
|
72 | - * @var string |
|
73 | - * |
|
74 | - * @ORM\Column(name="url_admin", type="string", length=255, nullable=true) |
|
75 | - */ |
|
76 | - private $urlAdmin; |
|
77 | - |
|
78 | - /** |
|
79 | - * @var boolean |
|
80 | - * |
|
81 | - * @ORM\Column(name="active", type="boolean", nullable=false) |
|
82 | - */ |
|
83 | - private $active; |
|
84 | - |
|
85 | - /** |
|
86 | - * @var integer |
|
87 | - * |
|
88 | - * @ORM\Column(name="`order`", type="integer", nullable=true) |
|
89 | - */ |
|
90 | - private $order; |
|
91 | - |
|
92 | - /** |
|
93 | - * @var boolean |
|
94 | - * |
|
95 | - * @ORM\Column(name="displayed", type="boolean", nullable=false) |
|
96 | - */ |
|
97 | - private $displayed; |
|
98 | - |
|
99 | - /** |
|
100 | - * @var boolean |
|
101 | - * |
|
102 | - * @ORM\Column(name="dev_mode", type="boolean", nullable=false) |
|
103 | - */ |
|
104 | - private $devMode = false; |
|
105 | - |
|
106 | - /** |
|
107 | - * @return int |
|
108 | - */ |
|
109 | - public function getId(): int |
|
110 | - { |
|
111 | - return $this->id; |
|
112 | - } |
|
113 | - |
|
114 | - /** |
|
115 | - * @param int $id |
|
116 | - */ |
|
117 | - public function setId(int $id) |
|
118 | - { |
|
119 | - $this->id = $id; |
|
120 | - } |
|
121 | - |
|
122 | - /** |
|
123 | - * @return string |
|
124 | - */ |
|
125 | - public function getPackageName(): ?string |
|
126 | - { |
|
127 | - return $this->packageName; |
|
128 | - } |
|
129 | - |
|
130 | - /** |
|
131 | - * @param string $package_name |
|
132 | - */ |
|
133 | - public function setPackageName(string $package_name) |
|
134 | - { |
|
135 | - $this->packageName = $package_name; |
|
136 | - } |
|
137 | - |
|
138 | - /** |
|
139 | - * @return string |
|
140 | - */ |
|
141 | - public function getTitleTag(): ?string |
|
142 | - { |
|
143 | - return $this->titleTag; |
|
144 | - } |
|
145 | - |
|
146 | - /** |
|
147 | - * @param string $titleTag |
|
148 | - */ |
|
149 | - public function setTitleTag(string $titleTag) |
|
150 | - { |
|
151 | - $this->titleTag = $titleTag; |
|
152 | - } |
|
153 | - |
|
154 | - /** |
|
155 | - * @return string |
|
156 | - */ |
|
157 | - public function getDescriptionTag(): ?string |
|
158 | - { |
|
159 | - return $this->descriptionTag; |
|
160 | - } |
|
161 | - |
|
162 | - /** |
|
163 | - * @param string $descriptionTag |
|
164 | - */ |
|
165 | - public function setDescriptionTag(string $descriptionTag) |
|
166 | - { |
|
167 | - $this->descriptionTag = $descriptionTag; |
|
168 | - } |
|
169 | - |
|
170 | - /** |
|
171 | - * @return string |
|
172 | - */ |
|
173 | - public function getTitle(): ?string |
|
174 | - { |
|
175 | - return $this->title; |
|
176 | - } |
|
177 | - |
|
178 | - /** |
|
179 | - * @param string $title |
|
180 | - */ |
|
181 | - public function setTitle(string $title) |
|
182 | - { |
|
183 | - $this->title = $title; |
|
184 | - } |
|
185 | - |
|
186 | - /** |
|
187 | - * @return string |
|
188 | - */ |
|
189 | - public function getTemplate(): ?string |
|
190 | - { |
|
191 | - return $this->template; |
|
192 | - } |
|
193 | - |
|
194 | - /** |
|
195 | - * @param string $template |
|
196 | - */ |
|
197 | - public function setTemplate(string $template) |
|
198 | - { |
|
199 | - $this->template = $template; |
|
200 | - } |
|
201 | - |
|
202 | - /** |
|
203 | - * @return string |
|
204 | - */ |
|
205 | - public function getUrl(): ?string |
|
206 | - { |
|
207 | - return $this->url; |
|
208 | - } |
|
209 | - |
|
210 | - /** |
|
211 | - * @param string $url |
|
212 | - */ |
|
213 | - public function setUrl(string $url) |
|
214 | - { |
|
215 | - $this->url = $url; |
|
216 | - } |
|
217 | - |
|
218 | - /** |
|
219 | - * @return string |
|
220 | - */ |
|
221 | - public function getUrlAdmin(): ?string |
|
222 | - { |
|
223 | - return $this->urlAdmin; |
|
224 | - } |
|
225 | - |
|
226 | - /** |
|
227 | - * @param string $urlAdmin |
|
228 | - */ |
|
229 | - public function setUrlAdmin(string $urlAdmin) |
|
230 | - { |
|
231 | - $this->urlAdmin = $urlAdmin; |
|
232 | - } |
|
233 | - |
|
234 | - /** |
|
235 | - * @return boolean |
|
236 | - */ |
|
237 | - public function getActive(): ?bool |
|
238 | - { |
|
239 | - return $this->active; |
|
240 | - } |
|
241 | - |
|
242 | - /** |
|
243 | - * @param bool $active |
|
244 | - */ |
|
245 | - public function setActive(bool $active) |
|
246 | - { |
|
247 | - $this->active = $active; |
|
248 | - } |
|
249 | - |
|
250 | - /** |
|
251 | - * @return int |
|
252 | - */ |
|
253 | - public function getOrder(): ?int |
|
254 | - { |
|
255 | - return $this->order; |
|
256 | - } |
|
257 | - |
|
258 | - /** |
|
259 | - * @param int $order |
|
260 | - */ |
|
261 | - public function setOrder(int $order) |
|
262 | - { |
|
263 | - $this->order = $order; |
|
264 | - } |
|
265 | - |
|
266 | - /** |
|
267 | - * @return bool |
|
268 | - */ |
|
269 | - public function getDisplayed(): ?bool |
|
270 | - { |
|
271 | - return $this->displayed; |
|
272 | - } |
|
273 | - |
|
274 | - /** |
|
275 | - * @param bool $displayed |
|
276 | - */ |
|
277 | - public function setDisplayed(bool $displayed) |
|
278 | - { |
|
279 | - $this->displayed = $displayed; |
|
280 | - } |
|
281 | - |
|
282 | - /** |
|
283 | - * @return bool |
|
284 | - */ |
|
285 | - public function getDevMode(): bool |
|
286 | - { |
|
287 | - return $this->devMode; |
|
288 | - } |
|
289 | - |
|
290 | - /** |
|
291 | - * @param bool $devMode |
|
292 | - * @return Module |
|
293 | - */ |
|
294 | - public function setDevMode(bool $devMode): Module |
|
295 | - { |
|
296 | - $this->devMode = $devMode; |
|
297 | - |
|
298 | - return $this; |
|
299 | - } |
|
300 | - |
|
301 | - public function getFormattedActive() |
|
302 | - { |
|
303 | - return $this->getActive() ? "Oui" : "Non"; |
|
304 | - } |
|
305 | - |
|
306 | - public function getFormattedDisplayed() |
|
307 | - { |
|
308 | - return $this->getDisplayed() ? "Oui" : "Non"; |
|
309 | - } |
|
17 | + use GuidTrait; |
|
18 | + use CreatedUpdatedTrait; |
|
19 | + |
|
20 | + /** |
|
21 | + * @var integer |
|
22 | + * |
|
23 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
24 | + * @ORM\Id |
|
25 | + * @ORM\GeneratedValue(strategy="IDENTITY") |
|
26 | + */ |
|
27 | + private $id; |
|
28 | + |
|
29 | + /** |
|
30 | + * @var string |
|
31 | + * |
|
32 | + * @ORM\Column(name="package_name", type="string", length=255, nullable=false) |
|
33 | + */ |
|
34 | + private $packageName; |
|
35 | + |
|
36 | + /** |
|
37 | + * @var string |
|
38 | + * |
|
39 | + * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
40 | + */ |
|
41 | + private $titleTag; |
|
42 | + |
|
43 | + /** |
|
44 | + * @var string |
|
45 | + * |
|
46 | + * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
47 | + */ |
|
48 | + private $descriptionTag; |
|
49 | + |
|
50 | + /** |
|
51 | + * @var string |
|
52 | + * |
|
53 | + * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
54 | + */ |
|
55 | + private $title; |
|
56 | + |
|
57 | + /** |
|
58 | + * @var string |
|
59 | + * |
|
60 | + * @ORM\Column(name="template", type="string", length=255, nullable=true) |
|
61 | + */ |
|
62 | + private $template; |
|
63 | + |
|
64 | + /** |
|
65 | + * @var string |
|
66 | + * |
|
67 | + * @ORM\Column(name="url", type="string", length=255, nullable=true) |
|
68 | + */ |
|
69 | + private $url; |
|
70 | + |
|
71 | + /** |
|
72 | + * @var string |
|
73 | + * |
|
74 | + * @ORM\Column(name="url_admin", type="string", length=255, nullable=true) |
|
75 | + */ |
|
76 | + private $urlAdmin; |
|
77 | + |
|
78 | + /** |
|
79 | + * @var boolean |
|
80 | + * |
|
81 | + * @ORM\Column(name="active", type="boolean", nullable=false) |
|
82 | + */ |
|
83 | + private $active; |
|
84 | + |
|
85 | + /** |
|
86 | + * @var integer |
|
87 | + * |
|
88 | + * @ORM\Column(name="`order`", type="integer", nullable=true) |
|
89 | + */ |
|
90 | + private $order; |
|
91 | + |
|
92 | + /** |
|
93 | + * @var boolean |
|
94 | + * |
|
95 | + * @ORM\Column(name="displayed", type="boolean", nullable=false) |
|
96 | + */ |
|
97 | + private $displayed; |
|
98 | + |
|
99 | + /** |
|
100 | + * @var boolean |
|
101 | + * |
|
102 | + * @ORM\Column(name="dev_mode", type="boolean", nullable=false) |
|
103 | + */ |
|
104 | + private $devMode = false; |
|
105 | + |
|
106 | + /** |
|
107 | + * @return int |
|
108 | + */ |
|
109 | + public function getId(): int |
|
110 | + { |
|
111 | + return $this->id; |
|
112 | + } |
|
113 | + |
|
114 | + /** |
|
115 | + * @param int $id |
|
116 | + */ |
|
117 | + public function setId(int $id) |
|
118 | + { |
|
119 | + $this->id = $id; |
|
120 | + } |
|
121 | + |
|
122 | + /** |
|
123 | + * @return string |
|
124 | + */ |
|
125 | + public function getPackageName(): ?string |
|
126 | + { |
|
127 | + return $this->packageName; |
|
128 | + } |
|
129 | + |
|
130 | + /** |
|
131 | + * @param string $package_name |
|
132 | + */ |
|
133 | + public function setPackageName(string $package_name) |
|
134 | + { |
|
135 | + $this->packageName = $package_name; |
|
136 | + } |
|
137 | + |
|
138 | + /** |
|
139 | + * @return string |
|
140 | + */ |
|
141 | + public function getTitleTag(): ?string |
|
142 | + { |
|
143 | + return $this->titleTag; |
|
144 | + } |
|
145 | + |
|
146 | + /** |
|
147 | + * @param string $titleTag |
|
148 | + */ |
|
149 | + public function setTitleTag(string $titleTag) |
|
150 | + { |
|
151 | + $this->titleTag = $titleTag; |
|
152 | + } |
|
153 | + |
|
154 | + /** |
|
155 | + * @return string |
|
156 | + */ |
|
157 | + public function getDescriptionTag(): ?string |
|
158 | + { |
|
159 | + return $this->descriptionTag; |
|
160 | + } |
|
161 | + |
|
162 | + /** |
|
163 | + * @param string $descriptionTag |
|
164 | + */ |
|
165 | + public function setDescriptionTag(string $descriptionTag) |
|
166 | + { |
|
167 | + $this->descriptionTag = $descriptionTag; |
|
168 | + } |
|
169 | + |
|
170 | + /** |
|
171 | + * @return string |
|
172 | + */ |
|
173 | + public function getTitle(): ?string |
|
174 | + { |
|
175 | + return $this->title; |
|
176 | + } |
|
177 | + |
|
178 | + /** |
|
179 | + * @param string $title |
|
180 | + */ |
|
181 | + public function setTitle(string $title) |
|
182 | + { |
|
183 | + $this->title = $title; |
|
184 | + } |
|
185 | + |
|
186 | + /** |
|
187 | + * @return string |
|
188 | + */ |
|
189 | + public function getTemplate(): ?string |
|
190 | + { |
|
191 | + return $this->template; |
|
192 | + } |
|
193 | + |
|
194 | + /** |
|
195 | + * @param string $template |
|
196 | + */ |
|
197 | + public function setTemplate(string $template) |
|
198 | + { |
|
199 | + $this->template = $template; |
|
200 | + } |
|
201 | + |
|
202 | + /** |
|
203 | + * @return string |
|
204 | + */ |
|
205 | + public function getUrl(): ?string |
|
206 | + { |
|
207 | + return $this->url; |
|
208 | + } |
|
209 | + |
|
210 | + /** |
|
211 | + * @param string $url |
|
212 | + */ |
|
213 | + public function setUrl(string $url) |
|
214 | + { |
|
215 | + $this->url = $url; |
|
216 | + } |
|
217 | + |
|
218 | + /** |
|
219 | + * @return string |
|
220 | + */ |
|
221 | + public function getUrlAdmin(): ?string |
|
222 | + { |
|
223 | + return $this->urlAdmin; |
|
224 | + } |
|
225 | + |
|
226 | + /** |
|
227 | + * @param string $urlAdmin |
|
228 | + */ |
|
229 | + public function setUrlAdmin(string $urlAdmin) |
|
230 | + { |
|
231 | + $this->urlAdmin = $urlAdmin; |
|
232 | + } |
|
233 | + |
|
234 | + /** |
|
235 | + * @return boolean |
|
236 | + */ |
|
237 | + public function getActive(): ?bool |
|
238 | + { |
|
239 | + return $this->active; |
|
240 | + } |
|
241 | + |
|
242 | + /** |
|
243 | + * @param bool $active |
|
244 | + */ |
|
245 | + public function setActive(bool $active) |
|
246 | + { |
|
247 | + $this->active = $active; |
|
248 | + } |
|
249 | + |
|
250 | + /** |
|
251 | + * @return int |
|
252 | + */ |
|
253 | + public function getOrder(): ?int |
|
254 | + { |
|
255 | + return $this->order; |
|
256 | + } |
|
257 | + |
|
258 | + /** |
|
259 | + * @param int $order |
|
260 | + */ |
|
261 | + public function setOrder(int $order) |
|
262 | + { |
|
263 | + $this->order = $order; |
|
264 | + } |
|
265 | + |
|
266 | + /** |
|
267 | + * @return bool |
|
268 | + */ |
|
269 | + public function getDisplayed(): ?bool |
|
270 | + { |
|
271 | + return $this->displayed; |
|
272 | + } |
|
273 | + |
|
274 | + /** |
|
275 | + * @param bool $displayed |
|
276 | + */ |
|
277 | + public function setDisplayed(bool $displayed) |
|
278 | + { |
|
279 | + $this->displayed = $displayed; |
|
280 | + } |
|
281 | + |
|
282 | + /** |
|
283 | + * @return bool |
|
284 | + */ |
|
285 | + public function getDevMode(): bool |
|
286 | + { |
|
287 | + return $this->devMode; |
|
288 | + } |
|
289 | + |
|
290 | + /** |
|
291 | + * @param bool $devMode |
|
292 | + * @return Module |
|
293 | + */ |
|
294 | + public function setDevMode(bool $devMode): Module |
|
295 | + { |
|
296 | + $this->devMode = $devMode; |
|
297 | + |
|
298 | + return $this; |
|
299 | + } |
|
300 | + |
|
301 | + public function getFormattedActive() |
|
302 | + { |
|
303 | + return $this->getActive() ? "Oui" : "Non"; |
|
304 | + } |
|
305 | + |
|
306 | + public function getFormattedDisplayed() |
|
307 | + { |
|
308 | + return $this->getDisplayed() ? "Oui" : "Non"; |
|
309 | + } |
|
310 | 310 | } |