@@ -7,8 +7,7 @@ discard block |
||
| 7 | 7 | use Symfony\Component\HttpFoundation\Response; |
| 8 | 8 | use Symfony\Component\Routing\Annotation\Route; |
| 9 | 9 | |
| 10 | -class AccountsController extends Controller |
|
| 11 | -{ |
|
| 10 | +class AccountsController extends Controller { |
|
| 12 | 11 | //-------------------------------------------- DISPLAY VIEWS ---------------------------------------------------------------// |
| 13 | 12 | /** |
| 14 | 13 | * @Route("/accounts/", name="ribsadmin_accounts") |
@@ -44,7 +43,8 @@ discard block |
||
| 44 | 43 | if ($activate === true) { |
| 45 | 44 | $user->setArchived(false); |
| 46 | 45 | $word = "activated"; |
| 47 | - } else { |
|
| 46 | + } |
|
| 47 | + else { |
|
| 48 | 48 | $user->setArchived(true); |
| 49 | 49 | $word = "disabled"; |
| 50 | 50 | } |
@@ -19,14 +19,14 @@ |
||
| 19 | 19 | 'label_attr' => [ |
| 20 | 20 | 'class' => 'label' |
| 21 | 21 | ], |
| 22 | - 'attr' => [], |
|
| 23 | - 'required' => true |
|
| 24 | - ]) |
|
| 25 | - ->add('submit', SubmitType::class, [ |
|
| 22 | + 'attr' => [], |
|
| 23 | + 'required' => true |
|
| 24 | + ]) |
|
| 25 | + ->add('submit', SubmitType::class, [ |
|
| 26 | 26 | 'label' => 'Validate', |
| 27 | 27 | 'attr' => [] |
| 28 | 28 | ]); |
| 29 | - } |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | 31 | public function configureOptions(OptionsResolver $resolver) |
| 32 | 32 | { |
@@ -9,10 +9,8 @@ discard block |
||
| 9 | 9 | use Symfony\Component\Form\FormBuilderInterface; |
| 10 | 10 | use Symfony\Component\OptionsResolver\OptionsResolver; |
| 11 | 11 | |
| 12 | -class AccessRight extends AbstractType |
|
| 13 | -{ |
|
| 14 | - public function buildForm(FormBuilderInterface $builder, array $options) |
|
| 15 | - { |
|
| 12 | +class AccessRight extends AbstractType { |
|
| 13 | + public function buildForm(FormBuilderInterface $builder, array $options) { |
|
| 16 | 14 | $builder |
| 17 | 15 | ->add('name', TextType::class, [ |
| 18 | 16 | 'label' => 'Name of the list', |
@@ -28,8 +26,7 @@ discard block |
||
| 28 | 26 | ]); |
| 29 | 27 | } |
| 30 | 28 | |
| 31 | - public function configureOptions(OptionsResolver $resolver) |
|
| 32 | - { |
|
| 29 | + public function configureOptions(OptionsResolver $resolver) { |
|
| 33 | 30 | $resolver->setDefaults([ |
| 34 | 31 | 'data_class' => \Ribs\RibsAdminBundle\Entity\AccessRight::class, |
| 35 | 32 | ]); |
@@ -9,15 +9,13 @@ discard block |
||
| 9 | 9 | use Symfony\Component\Security\Core\Exception\AuthenticationException; |
| 10 | 10 | use Symfony\Component\Security\Core\Security; |
| 11 | 11 | |
| 12 | -class LoginController extends FOSController |
|
| 13 | -{ |
|
| 12 | +class LoginController extends FOSController { |
|
| 14 | 13 | /** |
| 15 | 14 | * @param Request $request |
| 16 | 15 | * |
| 17 | 16 | * @return Response |
| 18 | 17 | */ |
| 19 | - public function loginAction(Request $request) |
|
| 20 | - { |
|
| 18 | + public function loginAction(Request $request) { |
|
| 21 | 19 | /** @var $session \Symfony\Component\HttpFoundation\Session\Session */ |
| 22 | 20 | $session = $request->getSession(); |
| 23 | 21 | |
@@ -28,7 +26,8 @@ discard block |
||
| 28 | 26 | // get the error if any (works with forward and redirect -- see below) |
| 29 | 27 | if ($request->attributes->has($authErrorKey)) { |
| 30 | 28 | $error = $request->attributes->get($authErrorKey); |
| 31 | - } else if (null !== $session && $session->has($authErrorKey)) { |
|
| 29 | + } |
|
| 30 | + else if (null !== $session && $session->has($authErrorKey)) { |
|
| 32 | 31 | $error = $session->get($authErrorKey); |
| 33 | 32 | $session->remove($authErrorKey); |
| 34 | 33 | } |
@@ -73,13 +72,11 @@ discard block |
||
| 73 | 72 | return $this->render("@RibsAdmin/login/login.html.twig", $data); |
| 74 | 73 | } |
| 75 | 74 | |
| 76 | - public function checkAction() |
|
| 77 | - { |
|
| 75 | + public function checkAction() { |
|
| 78 | 76 | throw new \RuntimeException('You must configure the check path to be handled by the firewall using form_login in your security firewall configuration.'); |
| 79 | 77 | } |
| 80 | 78 | |
| 81 | - public function logoutAction() |
|
| 82 | - { |
|
| 79 | + public function logoutAction() { |
|
| 83 | 80 | throw new \RuntimeException('You must activate the logout in your security firewall configuration.'); |
| 84 | 81 | } |
| 85 | 82 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | public function prePersist($entity) |
| 21 | 21 | { |
| 22 | 22 | if ($entity->getGuid() === null) { |
| 23 | - $entity->setGuid((string)Uuid::uuid4()); |
|
| 23 | + $entity->setGuid((string) Uuid::uuid4()); |
|
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -5,20 +5,17 @@ |
||
| 5 | 5 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 6 | 6 | use Ramsey\Uuid\Uuid; |
| 7 | 7 | |
| 8 | -class GuidAwareListener |
|
| 9 | -{ |
|
| 8 | +class GuidAwareListener { |
|
| 10 | 9 | /** |
| 11 | 10 | * @var ContainerInterface |
| 12 | 11 | */ |
| 13 | 12 | private $container; |
| 14 | 13 | |
| 15 | - public function __construct(ContainerInterface $container) |
|
| 16 | - { |
|
| 14 | + public function __construct(ContainerInterface $container) { |
|
| 17 | 15 | $this->container = $container; |
| 18 | 16 | } |
| 19 | 17 | |
| 20 | - public function prePersist($entity) |
|
| 21 | - { |
|
| 18 | + public function prePersist($entity) { |
|
| 22 | 19 | if ($entity->getGuid() === null) { |
| 23 | 20 | $entity->setGuid((string)Uuid::uuid4()); |
| 24 | 21 | } |
@@ -14,80 +14,80 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | class Page |
| 16 | 16 | { |
| 17 | - /** |
|
| 18 | - * @var integer |
|
| 19 | - * |
|
| 20 | - * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
| 21 | - * @ORM\Id |
|
| 22 | - * @ORM\GeneratedValue(strategy="IDENTITY") |
|
| 23 | - */ |
|
| 24 | - private $id; |
|
| 25 | - |
|
| 26 | - /** |
|
| 27 | - * @var string |
|
| 28 | - * |
|
| 29 | - * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
| 30 | - */ |
|
| 31 | - private $guid; |
|
| 32 | - |
|
| 33 | - /** |
|
| 34 | - * @var string |
|
| 35 | - * |
|
| 36 | - * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
| 37 | - */ |
|
| 38 | - private $titleTag; |
|
| 39 | - |
|
| 40 | - /** |
|
| 41 | - * @var string |
|
| 42 | - * |
|
| 43 | - * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
| 44 | - */ |
|
| 45 | - private $descriptionTag; |
|
| 46 | - |
|
| 47 | - /** |
|
| 48 | - * @var string |
|
| 49 | - * |
|
| 50 | - * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
| 51 | - */ |
|
| 52 | - private $title; |
|
| 53 | - |
|
| 54 | - /** |
|
| 55 | - * @var string |
|
| 56 | - * |
|
| 57 | - * @ORM\Column(name="content", type="text", nullable=true) |
|
| 58 | - */ |
|
| 59 | - private $content; |
|
| 60 | - |
|
| 61 | - /** |
|
| 62 | - * @var integer |
|
| 63 | - * |
|
| 64 | - * @ORM\Column(name="active", type="integer", nullable=false) |
|
| 65 | - */ |
|
| 66 | - private $active; |
|
| 67 | - |
|
| 68 | - /** |
|
| 69 | - * @var integer |
|
| 70 | - * |
|
| 71 | - * @ORM\Column(name="order", type="integer", nullable=false) |
|
| 72 | - */ |
|
| 73 | - private $order; |
|
| 74 | - |
|
| 75 | - /** |
|
| 76 | - * @var integer |
|
| 77 | - * |
|
| 78 | - * @ORM\Column(name="displayed", type="integer", nullable=false) |
|
| 79 | - */ |
|
| 80 | - private $displayed; |
|
| 81 | - |
|
| 82 | - /** |
|
| 83 | - * @var \Page |
|
| 84 | - * |
|
| 85 | - * @ORM\ManyToOne(targetEntity="Page") |
|
| 86 | - * @ORM\JoinColumns({ |
|
| 87 | - * @ORM\JoinColumn(name="parent", referencedColumnName="id") |
|
| 88 | - * }) |
|
| 89 | - */ |
|
| 90 | - private $parent; |
|
| 17 | + /** |
|
| 18 | + * @var integer |
|
| 19 | + * |
|
| 20 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
| 21 | + * @ORM\Id |
|
| 22 | + * @ORM\GeneratedValue(strategy="IDENTITY") |
|
| 23 | + */ |
|
| 24 | + private $id; |
|
| 25 | + |
|
| 26 | + /** |
|
| 27 | + * @var string |
|
| 28 | + * |
|
| 29 | + * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
| 30 | + */ |
|
| 31 | + private $guid; |
|
| 32 | + |
|
| 33 | + /** |
|
| 34 | + * @var string |
|
| 35 | + * |
|
| 36 | + * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
| 37 | + */ |
|
| 38 | + private $titleTag; |
|
| 39 | + |
|
| 40 | + /** |
|
| 41 | + * @var string |
|
| 42 | + * |
|
| 43 | + * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
| 44 | + */ |
|
| 45 | + private $descriptionTag; |
|
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * @var string |
|
| 49 | + * |
|
| 50 | + * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
| 51 | + */ |
|
| 52 | + private $title; |
|
| 53 | + |
|
| 54 | + /** |
|
| 55 | + * @var string |
|
| 56 | + * |
|
| 57 | + * @ORM\Column(name="content", type="text", nullable=true) |
|
| 58 | + */ |
|
| 59 | + private $content; |
|
| 60 | + |
|
| 61 | + /** |
|
| 62 | + * @var integer |
|
| 63 | + * |
|
| 64 | + * @ORM\Column(name="active", type="integer", nullable=false) |
|
| 65 | + */ |
|
| 66 | + private $active; |
|
| 67 | + |
|
| 68 | + /** |
|
| 69 | + * @var integer |
|
| 70 | + * |
|
| 71 | + * @ORM\Column(name="order", type="integer", nullable=false) |
|
| 72 | + */ |
|
| 73 | + private $order; |
|
| 74 | + |
|
| 75 | + /** |
|
| 76 | + * @var integer |
|
| 77 | + * |
|
| 78 | + * @ORM\Column(name="displayed", type="integer", nullable=false) |
|
| 79 | + */ |
|
| 80 | + private $displayed; |
|
| 81 | + |
|
| 82 | + /** |
|
| 83 | + * @var \Page |
|
| 84 | + * |
|
| 85 | + * @ORM\ManyToOne(targetEntity="Page") |
|
| 86 | + * @ORM\JoinColumns({ |
|
| 87 | + * @ORM\JoinColumn(name="parent", referencedColumnName="id") |
|
| 88 | + * }) |
|
| 89 | + */ |
|
| 90 | + private $parent; |
|
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * @var \DateTime |
@@ -105,165 +105,165 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | private $updateDate; |
| 107 | 107 | |
| 108 | - /** |
|
| 109 | - * @return int |
|
| 110 | - */ |
|
| 111 | - public function getId() |
|
| 112 | - { |
|
| 113 | - return $this->id; |
|
| 114 | - } |
|
| 115 | - |
|
| 116 | - /** |
|
| 117 | - * @param int $id |
|
| 118 | - */ |
|
| 119 | - public function setId($id) |
|
| 120 | - { |
|
| 121 | - $this->id = $id; |
|
| 122 | - } |
|
| 123 | - |
|
| 124 | - /** |
|
| 125 | - * @return string |
|
| 126 | - */ |
|
| 127 | - public function getGuid() |
|
| 128 | - { |
|
| 129 | - return $this->guid; |
|
| 130 | - } |
|
| 131 | - |
|
| 132 | - /** |
|
| 133 | - * @param string $guid |
|
| 134 | - */ |
|
| 135 | - public function setGuid($guid) |
|
| 136 | - { |
|
| 137 | - $this->guid = $guid; |
|
| 138 | - } |
|
| 139 | - |
|
| 140 | - /** |
|
| 141 | - * @return string |
|
| 142 | - */ |
|
| 143 | - public function getTitleTag() |
|
| 144 | - { |
|
| 145 | - return $this->titleTag; |
|
| 146 | - } |
|
| 147 | - |
|
| 148 | - /** |
|
| 149 | - * @param string $titleTag |
|
| 150 | - */ |
|
| 151 | - public function setTitleTag($titleTag) |
|
| 152 | - { |
|
| 153 | - $this->titleTag = $titleTag; |
|
| 154 | - } |
|
| 155 | - |
|
| 156 | - /** |
|
| 157 | - * @return string |
|
| 158 | - */ |
|
| 159 | - public function getDescriptionTag() |
|
| 160 | - { |
|
| 161 | - return $this->descriptionTag; |
|
| 162 | - } |
|
| 163 | - |
|
| 164 | - /** |
|
| 165 | - * @param string $descriptionTag |
|
| 166 | - */ |
|
| 167 | - public function setDescriptionTag($descriptionTag) |
|
| 168 | - { |
|
| 169 | - $this->descriptionTag = $descriptionTag; |
|
| 170 | - } |
|
| 171 | - |
|
| 172 | - /** |
|
| 173 | - * @return string |
|
| 174 | - */ |
|
| 175 | - public function getTitle() |
|
| 176 | - { |
|
| 177 | - return $this->title; |
|
| 178 | - } |
|
| 179 | - |
|
| 180 | - /** |
|
| 181 | - * @param string $title |
|
| 182 | - */ |
|
| 183 | - public function setTitle($title) |
|
| 184 | - { |
|
| 185 | - $this->title = $title; |
|
| 186 | - } |
|
| 187 | - |
|
| 188 | - /** |
|
| 189 | - * @return string |
|
| 190 | - */ |
|
| 191 | - public function getContent() |
|
| 192 | - { |
|
| 193 | - return $this->content; |
|
| 194 | - } |
|
| 195 | - |
|
| 196 | - /** |
|
| 197 | - * @param string $content |
|
| 198 | - */ |
|
| 199 | - public function setContent($content) |
|
| 200 | - { |
|
| 201 | - $this->content = $content; |
|
| 202 | - } |
|
| 203 | - |
|
| 204 | - /** |
|
| 205 | - * @return int |
|
| 206 | - */ |
|
| 207 | - public function getActive() |
|
| 208 | - { |
|
| 209 | - return $this->active; |
|
| 210 | - } |
|
| 211 | - |
|
| 212 | - /** |
|
| 213 | - * @param int $active |
|
| 214 | - */ |
|
| 215 | - public function setActive($active) |
|
| 216 | - { |
|
| 217 | - $this->active = $active; |
|
| 218 | - } |
|
| 219 | - |
|
| 220 | - /** |
|
| 221 | - * @return int |
|
| 222 | - */ |
|
| 223 | - public function getOrder() |
|
| 224 | - { |
|
| 225 | - return $this->order; |
|
| 226 | - } |
|
| 227 | - |
|
| 228 | - /** |
|
| 229 | - * @param int $order |
|
| 230 | - */ |
|
| 231 | - public function setOrder($order) |
|
| 232 | - { |
|
| 233 | - $this->order = $order; |
|
| 234 | - } |
|
| 235 | - |
|
| 236 | - /** |
|
| 237 | - * @return int |
|
| 238 | - */ |
|
| 239 | - public function getDisplayed() |
|
| 240 | - { |
|
| 241 | - return $this->displayed; |
|
| 242 | - } |
|
| 243 | - |
|
| 244 | - /** |
|
| 245 | - * @param int $displayed |
|
| 246 | - */ |
|
| 247 | - public function setDisplayed($displayed) |
|
| 248 | - { |
|
| 249 | - $this->displayed = $displayed; |
|
| 250 | - } |
|
| 251 | - |
|
| 252 | - /** |
|
| 253 | - * @return \Page |
|
| 254 | - */ |
|
| 255 | - public function getParent() |
|
| 256 | - { |
|
| 257 | - return $this->parent; |
|
| 258 | - } |
|
| 259 | - |
|
| 260 | - /** |
|
| 261 | - * @param \Page $parent |
|
| 262 | - */ |
|
| 263 | - public function setParent($parent) |
|
| 264 | - { |
|
| 265 | - $this->parent = $parent; |
|
| 266 | - } |
|
| 108 | + /** |
|
| 109 | + * @return int |
|
| 110 | + */ |
|
| 111 | + public function getId() |
|
| 112 | + { |
|
| 113 | + return $this->id; |
|
| 114 | + } |
|
| 115 | + |
|
| 116 | + /** |
|
| 117 | + * @param int $id |
|
| 118 | + */ |
|
| 119 | + public function setId($id) |
|
| 120 | + { |
|
| 121 | + $this->id = $id; |
|
| 122 | + } |
|
| 123 | + |
|
| 124 | + /** |
|
| 125 | + * @return string |
|
| 126 | + */ |
|
| 127 | + public function getGuid() |
|
| 128 | + { |
|
| 129 | + return $this->guid; |
|
| 130 | + } |
|
| 131 | + |
|
| 132 | + /** |
|
| 133 | + * @param string $guid |
|
| 134 | + */ |
|
| 135 | + public function setGuid($guid) |
|
| 136 | + { |
|
| 137 | + $this->guid = $guid; |
|
| 138 | + } |
|
| 139 | + |
|
| 140 | + /** |
|
| 141 | + * @return string |
|
| 142 | + */ |
|
| 143 | + public function getTitleTag() |
|
| 144 | + { |
|
| 145 | + return $this->titleTag; |
|
| 146 | + } |
|
| 147 | + |
|
| 148 | + /** |
|
| 149 | + * @param string $titleTag |
|
| 150 | + */ |
|
| 151 | + public function setTitleTag($titleTag) |
|
| 152 | + { |
|
| 153 | + $this->titleTag = $titleTag; |
|
| 154 | + } |
|
| 155 | + |
|
| 156 | + /** |
|
| 157 | + * @return string |
|
| 158 | + */ |
|
| 159 | + public function getDescriptionTag() |
|
| 160 | + { |
|
| 161 | + return $this->descriptionTag; |
|
| 162 | + } |
|
| 163 | + |
|
| 164 | + /** |
|
| 165 | + * @param string $descriptionTag |
|
| 166 | + */ |
|
| 167 | + public function setDescriptionTag($descriptionTag) |
|
| 168 | + { |
|
| 169 | + $this->descriptionTag = $descriptionTag; |
|
| 170 | + } |
|
| 171 | + |
|
| 172 | + /** |
|
| 173 | + * @return string |
|
| 174 | + */ |
|
| 175 | + public function getTitle() |
|
| 176 | + { |
|
| 177 | + return $this->title; |
|
| 178 | + } |
|
| 179 | + |
|
| 180 | + /** |
|
| 181 | + * @param string $title |
|
| 182 | + */ |
|
| 183 | + public function setTitle($title) |
|
| 184 | + { |
|
| 185 | + $this->title = $title; |
|
| 186 | + } |
|
| 187 | + |
|
| 188 | + /** |
|
| 189 | + * @return string |
|
| 190 | + */ |
|
| 191 | + public function getContent() |
|
| 192 | + { |
|
| 193 | + return $this->content; |
|
| 194 | + } |
|
| 195 | + |
|
| 196 | + /** |
|
| 197 | + * @param string $content |
|
| 198 | + */ |
|
| 199 | + public function setContent($content) |
|
| 200 | + { |
|
| 201 | + $this->content = $content; |
|
| 202 | + } |
|
| 203 | + |
|
| 204 | + /** |
|
| 205 | + * @return int |
|
| 206 | + */ |
|
| 207 | + public function getActive() |
|
| 208 | + { |
|
| 209 | + return $this->active; |
|
| 210 | + } |
|
| 211 | + |
|
| 212 | + /** |
|
| 213 | + * @param int $active |
|
| 214 | + */ |
|
| 215 | + public function setActive($active) |
|
| 216 | + { |
|
| 217 | + $this->active = $active; |
|
| 218 | + } |
|
| 219 | + |
|
| 220 | + /** |
|
| 221 | + * @return int |
|
| 222 | + */ |
|
| 223 | + public function getOrder() |
|
| 224 | + { |
|
| 225 | + return $this->order; |
|
| 226 | + } |
|
| 227 | + |
|
| 228 | + /** |
|
| 229 | + * @param int $order |
|
| 230 | + */ |
|
| 231 | + public function setOrder($order) |
|
| 232 | + { |
|
| 233 | + $this->order = $order; |
|
| 234 | + } |
|
| 235 | + |
|
| 236 | + /** |
|
| 237 | + * @return int |
|
| 238 | + */ |
|
| 239 | + public function getDisplayed() |
|
| 240 | + { |
|
| 241 | + return $this->displayed; |
|
| 242 | + } |
|
| 243 | + |
|
| 244 | + /** |
|
| 245 | + * @param int $displayed |
|
| 246 | + */ |
|
| 247 | + public function setDisplayed($displayed) |
|
| 248 | + { |
|
| 249 | + $this->displayed = $displayed; |
|
| 250 | + } |
|
| 251 | + |
|
| 252 | + /** |
|
| 253 | + * @return \Page |
|
| 254 | + */ |
|
| 255 | + public function getParent() |
|
| 256 | + { |
|
| 257 | + return $this->parent; |
|
| 258 | + } |
|
| 259 | + |
|
| 260 | + /** |
|
| 261 | + * @param \Page $parent |
|
| 262 | + */ |
|
| 263 | + public function setParent($parent) |
|
| 264 | + { |
|
| 265 | + $this->parent = $parent; |
|
| 266 | + } |
|
| 267 | 267 | |
| 268 | 268 | /** |
| 269 | 269 | * @return \DateTime |
@@ -12,8 +12,7 @@ discard block |
||
| 12 | 12 | * @ORM\Entity |
| 13 | 13 | * @ORM\EntityListeners({"Ribs\RibsAdminBundle\EventListener\GuidAwareListener"}) |
| 14 | 14 | */ |
| 15 | -class Page |
|
| 16 | -{ |
|
| 15 | +class Page { |
|
| 17 | 16 | /** |
| 18 | 17 | * @var integer |
| 19 | 18 | * |
@@ -108,160 +107,140 @@ discard block |
||
| 108 | 107 | /** |
| 109 | 108 | * @return int |
| 110 | 109 | */ |
| 111 | - public function getId() |
|
| 112 | - { |
|
| 110 | + public function getId() { |
|
| 113 | 111 | return $this->id; |
| 114 | 112 | } |
| 115 | 113 | |
| 116 | 114 | /** |
| 117 | 115 | * @param int $id |
| 118 | 116 | */ |
| 119 | - public function setId($id) |
|
| 120 | - { |
|
| 117 | + public function setId($id) { |
|
| 121 | 118 | $this->id = $id; |
| 122 | 119 | } |
| 123 | 120 | |
| 124 | 121 | /** |
| 125 | 122 | * @return string |
| 126 | 123 | */ |
| 127 | - public function getGuid() |
|
| 128 | - { |
|
| 124 | + public function getGuid() { |
|
| 129 | 125 | return $this->guid; |
| 130 | 126 | } |
| 131 | 127 | |
| 132 | 128 | /** |
| 133 | 129 | * @param string $guid |
| 134 | 130 | */ |
| 135 | - public function setGuid($guid) |
|
| 136 | - { |
|
| 131 | + public function setGuid($guid) { |
|
| 137 | 132 | $this->guid = $guid; |
| 138 | 133 | } |
| 139 | 134 | |
| 140 | 135 | /** |
| 141 | 136 | * @return string |
| 142 | 137 | */ |
| 143 | - public function getTitleTag() |
|
| 144 | - { |
|
| 138 | + public function getTitleTag() { |
|
| 145 | 139 | return $this->titleTag; |
| 146 | 140 | } |
| 147 | 141 | |
| 148 | 142 | /** |
| 149 | 143 | * @param string $titleTag |
| 150 | 144 | */ |
| 151 | - public function setTitleTag($titleTag) |
|
| 152 | - { |
|
| 145 | + public function setTitleTag($titleTag) { |
|
| 153 | 146 | $this->titleTag = $titleTag; |
| 154 | 147 | } |
| 155 | 148 | |
| 156 | 149 | /** |
| 157 | 150 | * @return string |
| 158 | 151 | */ |
| 159 | - public function getDescriptionTag() |
|
| 160 | - { |
|
| 152 | + public function getDescriptionTag() { |
|
| 161 | 153 | return $this->descriptionTag; |
| 162 | 154 | } |
| 163 | 155 | |
| 164 | 156 | /** |
| 165 | 157 | * @param string $descriptionTag |
| 166 | 158 | */ |
| 167 | - public function setDescriptionTag($descriptionTag) |
|
| 168 | - { |
|
| 159 | + public function setDescriptionTag($descriptionTag) { |
|
| 169 | 160 | $this->descriptionTag = $descriptionTag; |
| 170 | 161 | } |
| 171 | 162 | |
| 172 | 163 | /** |
| 173 | 164 | * @return string |
| 174 | 165 | */ |
| 175 | - public function getTitle() |
|
| 176 | - { |
|
| 166 | + public function getTitle() { |
|
| 177 | 167 | return $this->title; |
| 178 | 168 | } |
| 179 | 169 | |
| 180 | 170 | /** |
| 181 | 171 | * @param string $title |
| 182 | 172 | */ |
| 183 | - public function setTitle($title) |
|
| 184 | - { |
|
| 173 | + public function setTitle($title) { |
|
| 185 | 174 | $this->title = $title; |
| 186 | 175 | } |
| 187 | 176 | |
| 188 | 177 | /** |
| 189 | 178 | * @return string |
| 190 | 179 | */ |
| 191 | - public function getContent() |
|
| 192 | - { |
|
| 180 | + public function getContent() { |
|
| 193 | 181 | return $this->content; |
| 194 | 182 | } |
| 195 | 183 | |
| 196 | 184 | /** |
| 197 | 185 | * @param string $content |
| 198 | 186 | */ |
| 199 | - public function setContent($content) |
|
| 200 | - { |
|
| 187 | + public function setContent($content) { |
|
| 201 | 188 | $this->content = $content; |
| 202 | 189 | } |
| 203 | 190 | |
| 204 | 191 | /** |
| 205 | 192 | * @return int |
| 206 | 193 | */ |
| 207 | - public function getActive() |
|
| 208 | - { |
|
| 194 | + public function getActive() { |
|
| 209 | 195 | return $this->active; |
| 210 | 196 | } |
| 211 | 197 | |
| 212 | 198 | /** |
| 213 | 199 | * @param int $active |
| 214 | 200 | */ |
| 215 | - public function setActive($active) |
|
| 216 | - { |
|
| 201 | + public function setActive($active) { |
|
| 217 | 202 | $this->active = $active; |
| 218 | 203 | } |
| 219 | 204 | |
| 220 | 205 | /** |
| 221 | 206 | * @return int |
| 222 | 207 | */ |
| 223 | - public function getOrder() |
|
| 224 | - { |
|
| 208 | + public function getOrder() { |
|
| 225 | 209 | return $this->order; |
| 226 | 210 | } |
| 227 | 211 | |
| 228 | 212 | /** |
| 229 | 213 | * @param int $order |
| 230 | 214 | */ |
| 231 | - public function setOrder($order) |
|
| 232 | - { |
|
| 215 | + public function setOrder($order) { |
|
| 233 | 216 | $this->order = $order; |
| 234 | 217 | } |
| 235 | 218 | |
| 236 | 219 | /** |
| 237 | 220 | * @return int |
| 238 | 221 | */ |
| 239 | - public function getDisplayed() |
|
| 240 | - { |
|
| 222 | + public function getDisplayed() { |
|
| 241 | 223 | return $this->displayed; |
| 242 | 224 | } |
| 243 | 225 | |
| 244 | 226 | /** |
| 245 | 227 | * @param int $displayed |
| 246 | 228 | */ |
| 247 | - public function setDisplayed($displayed) |
|
| 248 | - { |
|
| 229 | + public function setDisplayed($displayed) { |
|
| 249 | 230 | $this->displayed = $displayed; |
| 250 | 231 | } |
| 251 | 232 | |
| 252 | 233 | /** |
| 253 | 234 | * @return \Page |
| 254 | 235 | */ |
| 255 | - public function getParent() |
|
| 256 | - { |
|
| 236 | + public function getParent() { |
|
| 257 | 237 | return $this->parent; |
| 258 | 238 | } |
| 259 | 239 | |
| 260 | 240 | /** |
| 261 | 241 | * @param \Page $parent |
| 262 | 242 | */ |
| 263 | - public function setParent($parent) |
|
| 264 | - { |
|
| 243 | + public function setParent($parent) { |
|
| 265 | 244 | $this->parent = $parent; |
| 266 | 245 | } |
| 267 | 246 | |
@@ -276,8 +255,7 @@ discard block |
||
| 276 | 255 | /** |
| 277 | 256 | * @param \DateTime $creationDate |
| 278 | 257 | */ |
| 279 | - public function setCreationDate(\DateTime $creationDate) |
|
| 280 | - { |
|
| 258 | + public function setCreationDate(\DateTime $creationDate) { |
|
| 281 | 259 | $this->creationDate = $creationDate; |
| 282 | 260 | } |
| 283 | 261 | |
@@ -292,8 +270,7 @@ discard block |
||
| 292 | 270 | /** |
| 293 | 271 | * @param \DateTime $updateDate |
| 294 | 272 | */ |
| 295 | - public function setUpdateDate(\DateTime $updateDate) |
|
| 296 | - { |
|
| 273 | + public function setUpdateDate(\DateTime $updateDate) { |
|
| 297 | 274 | $this->updateDate = $updateDate; |
| 298 | 275 | } |
| 299 | 276 | } |
@@ -13,26 +13,26 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | class UserLogs |
| 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="NONE") |
|
| 22 | - */ |
|
| 23 | - private $id; |
|
| 16 | + /** |
|
| 17 | + * @var integer |
|
| 18 | + * |
|
| 19 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
| 20 | + * @ORM\Id |
|
| 21 | + * @ORM\GeneratedValue(strategy="NONE") |
|
| 22 | + */ |
|
| 23 | + private $id; |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * @var \User |
|
| 27 | - * |
|
| 28 | - * @ORM\Id |
|
| 29 | - * @ORM\GeneratedValue(strategy="NONE") |
|
| 30 | - * @ORM\OneToOne(targetEntity="User") |
|
| 31 | - * @ORM\JoinColumns({ |
|
| 32 | - * @ORM\JoinColumn(name="user_id", referencedColumnName="id") |
|
| 33 | - * }) |
|
| 34 | - */ |
|
| 35 | - private $user; |
|
| 25 | + /** |
|
| 26 | + * @var \User |
|
| 27 | + * |
|
| 28 | + * @ORM\Id |
|
| 29 | + * @ORM\GeneratedValue(strategy="NONE") |
|
| 30 | + * @ORM\OneToOne(targetEntity="User") |
|
| 31 | + * @ORM\JoinColumns({ |
|
| 32 | + * @ORM\JoinColumn(name="user_id", referencedColumnName="id") |
|
| 33 | + * }) |
|
| 34 | + */ |
|
| 35 | + private $user; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @var \DateTime |
@@ -50,37 +50,37 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | private $updateDate; |
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * @return int |
|
| 55 | - */ |
|
| 56 | - public function getId() |
|
| 57 | - { |
|
| 58 | - return $this->id; |
|
| 59 | - } |
|
| 53 | + /** |
|
| 54 | + * @return int |
|
| 55 | + */ |
|
| 56 | + public function getId() |
|
| 57 | + { |
|
| 58 | + return $this->id; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * @param int $id |
|
| 63 | - */ |
|
| 64 | - public function setId($id) |
|
| 65 | - { |
|
| 66 | - $this->id = $id; |
|
| 67 | - } |
|
| 61 | + /** |
|
| 62 | + * @param int $id |
|
| 63 | + */ |
|
| 64 | + public function setId($id) |
|
| 65 | + { |
|
| 66 | + $this->id = $id; |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * @return \User |
|
| 71 | - */ |
|
| 72 | - public function getUser() |
|
| 73 | - { |
|
| 74 | - return $this->user; |
|
| 75 | - } |
|
| 69 | + /** |
|
| 70 | + * @return \User |
|
| 71 | + */ |
|
| 72 | + public function getUser() |
|
| 73 | + { |
|
| 74 | + return $this->user; |
|
| 75 | + } |
|
| 76 | 76 | |
| 77 | - /** |
|
| 78 | - * @param \User $user |
|
| 79 | - */ |
|
| 80 | - public function setUser($user) |
|
| 81 | - { |
|
| 82 | - $this->user = $user; |
|
| 83 | - } |
|
| 77 | + /** |
|
| 78 | + * @param \User $user |
|
| 79 | + */ |
|
| 80 | + public function setUser($user) |
|
| 81 | + { |
|
| 82 | + $this->user = $user; |
|
| 83 | + } |
|
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | 86 | * @return \DateTime |
@@ -11,8 +11,7 @@ discard block |
||
| 11 | 11 | * @ORM\Table(name="user_logs", indexes={@ORM\Index(name="fk_user_infos_user_idx", columns={"user_id"})}) |
| 12 | 12 | * @ORM\Entity |
| 13 | 13 | */ |
| 14 | -class UserLogs |
|
| 15 | -{ |
|
| 14 | +class UserLogs { |
|
| 16 | 15 | /** |
| 17 | 16 | * @var integer |
| 18 | 17 | * |
@@ -53,32 +52,28 @@ discard block |
||
| 53 | 52 | /** |
| 54 | 53 | * @return int |
| 55 | 54 | */ |
| 56 | - public function getId() |
|
| 57 | - { |
|
| 55 | + public function getId() { |
|
| 58 | 56 | return $this->id; |
| 59 | 57 | } |
| 60 | 58 | |
| 61 | 59 | /** |
| 62 | 60 | * @param int $id |
| 63 | 61 | */ |
| 64 | - public function setId($id) |
|
| 65 | - { |
|
| 62 | + public function setId($id) { |
|
| 66 | 63 | $this->id = $id; |
| 67 | 64 | } |
| 68 | 65 | |
| 69 | 66 | /** |
| 70 | 67 | * @return \User |
| 71 | 68 | */ |
| 72 | - public function getUser() |
|
| 73 | - { |
|
| 69 | + public function getUser() { |
|
| 74 | 70 | return $this->user; |
| 75 | 71 | } |
| 76 | 72 | |
| 77 | 73 | /** |
| 78 | 74 | * @param \User $user |
| 79 | 75 | */ |
| 80 | - public function setUser($user) |
|
| 81 | - { |
|
| 76 | + public function setUser($user) { |
|
| 82 | 77 | $this->user = $user; |
| 83 | 78 | } |
| 84 | 79 | |
@@ -93,8 +88,7 @@ discard block |
||
| 93 | 88 | /** |
| 94 | 89 | * @param \DateTime $creationDate |
| 95 | 90 | */ |
| 96 | - public function setCreationDate(\DateTime $creationDate) |
|
| 97 | - { |
|
| 91 | + public function setCreationDate(\DateTime $creationDate) { |
|
| 98 | 92 | $this->creationDate = $creationDate; |
| 99 | 93 | } |
| 100 | 94 | |
@@ -109,8 +103,7 @@ discard block |
||
| 109 | 103 | /** |
| 110 | 104 | * @param \DateTime $updateDate |
| 111 | 105 | */ |
| 112 | - public function setUpdateDate(\DateTime $updateDate) |
|
| 113 | - { |
|
| 106 | + public function setUpdateDate(\DateTime $updateDate) { |
|
| 114 | 107 | $this->updateDate = $updateDate; |
| 115 | 108 | } |
| 116 | 109 | } |
@@ -10,8 +10,7 @@ discard block |
||
| 10 | 10 | use Symfony\Component\HttpFoundation\Response; |
| 11 | 11 | use Symfony\Component\Routing\Annotation\Route; |
| 12 | 12 | |
| 13 | -class AccessRightsController extends Controller |
|
| 14 | -{ |
|
| 13 | +class AccessRightsController extends Controller { |
|
| 15 | 14 | //---------------------------------------------- VIEWS METHODS ---------------------------------------------------------// |
| 16 | 15 | /** |
| 17 | 16 | * @Route("/access-rights-management/", name="ribsadmin_access_rights") |
@@ -41,7 +40,8 @@ discard block |
||
| 41 | 40 | |
| 42 | 41 | if ($guid === null) { |
| 43 | 42 | $access_right = new AccessRight(); |
| 44 | - } else { |
|
| 43 | + } |
|
| 44 | + else { |
|
| 45 | 45 | $access_right = $em->getRepository("RibsAdminBundle:AccessRight")->findOneBy(["guid" => $guid]); |
| 46 | 46 | $list_rights_user = explode(",", $access_right->getAccessRights()); |
| 47 | 47 | } |
@@ -98,7 +98,8 @@ discard block |
||
| 98 | 98 | $em->flush(); |
| 99 | 99 | |
| 100 | 100 | $this->addFlash("success-flash", "The right list was deleted"); |
| 101 | - } else { |
|
| 101 | + } |
|
| 102 | + else { |
|
| 102 | 103 | $this->addFlash("error-flash", "The right list wasn't found"); |
| 103 | 104 | } |
| 104 | 105 | |
@@ -14,21 +14,21 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | class User |
| 16 | 16 | { |
| 17 | - /** |
|
| 18 | - * @var integer |
|
| 19 | - * |
|
| 20 | - * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
| 21 | - * @ORM\Id |
|
| 22 | - * @ORM\GeneratedValue(strategy="IDENTITY") |
|
| 23 | - */ |
|
| 24 | - private $id; |
|
| 25 | - |
|
| 26 | - /** |
|
| 27 | - * @var string |
|
| 28 | - * |
|
| 29 | - * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
| 30 | - */ |
|
| 31 | - private $guid; |
|
| 17 | + /** |
|
| 18 | + * @var integer |
|
| 19 | + * |
|
| 20 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
| 21 | + * @ORM\Id |
|
| 22 | + * @ORM\GeneratedValue(strategy="IDENTITY") |
|
| 23 | + */ |
|
| 24 | + private $id; |
|
| 25 | + |
|
| 26 | + /** |
|
| 27 | + * @var string |
|
| 28 | + * |
|
| 29 | + * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
| 30 | + */ |
|
| 31 | + private $guid; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * @var AccessRight |
@@ -36,63 +36,63 @@ discard block |
||
| 36 | 36 | * @ORM\ManyToOne(targetEntity="Ribs\RibsAdminBundle\Entity\AccessRight", inversedBy="users") |
| 37 | 37 | * @ORM\JoinColumn(name="id_access_right", referencedColumnName="id", nullable=true) |
| 38 | 38 | */ |
| 39 | - private $accessRightList; |
|
| 39 | + private $accessRightList; |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * @var boolean |
| 43 | 43 | * |
| 44 | 44 | * @ORM\Column(name="admin", type="boolean", nullable=false, options={"default": false}) |
| 45 | 45 | */ |
| 46 | - private $admin; |
|
| 47 | - |
|
| 48 | - /** |
|
| 49 | - * @var string |
|
| 50 | - * |
|
| 51 | - * @ORM\Column(name="firstname", type="string", length=255, nullable=false) |
|
| 52 | - */ |
|
| 53 | - private $firstname; |
|
| 54 | - |
|
| 55 | - /** |
|
| 56 | - * @var string |
|
| 57 | - * |
|
| 58 | - * @ORM\Column(name="lastname", type="string", length=255, nullable=false) |
|
| 59 | - */ |
|
| 60 | - private $lastname; |
|
| 61 | - |
|
| 62 | - /** |
|
| 63 | - * @var string |
|
| 64 | - * |
|
| 65 | - * @ORM\Column(name="adress", type="string", length=255, nullable=true) |
|
| 66 | - */ |
|
| 67 | - private $adress; |
|
| 68 | - |
|
| 69 | - /** |
|
| 70 | - * @var string |
|
| 71 | - * |
|
| 72 | - * @ORM\Column(name="postal_code", type="string", length=100, nullable=true) |
|
| 73 | - */ |
|
| 74 | - private $postalCode; |
|
| 75 | - |
|
| 76 | - /** |
|
| 77 | - * @var string |
|
| 78 | - * |
|
| 79 | - * @ORM\Column(name="country", type="string", length=100, nullable=true) |
|
| 80 | - */ |
|
| 81 | - private $country; |
|
| 82 | - |
|
| 83 | - /** |
|
| 84 | - * @var string |
|
| 85 | - * |
|
| 86 | - * @ORM\Column(name="state", type="string", length=255, nullable=true) |
|
| 87 | - */ |
|
| 88 | - private $state; |
|
| 89 | - |
|
| 90 | - /** |
|
| 91 | - * @var string |
|
| 92 | - * |
|
| 93 | - * @ORM\Column(name="access_rights", type="text", nullable=true) |
|
| 94 | - */ |
|
| 95 | - private $accessRights; |
|
| 46 | + private $admin; |
|
| 47 | + |
|
| 48 | + /** |
|
| 49 | + * @var string |
|
| 50 | + * |
|
| 51 | + * @ORM\Column(name="firstname", type="string", length=255, nullable=false) |
|
| 52 | + */ |
|
| 53 | + private $firstname; |
|
| 54 | + |
|
| 55 | + /** |
|
| 56 | + * @var string |
|
| 57 | + * |
|
| 58 | + * @ORM\Column(name="lastname", type="string", length=255, nullable=false) |
|
| 59 | + */ |
|
| 60 | + private $lastname; |
|
| 61 | + |
|
| 62 | + /** |
|
| 63 | + * @var string |
|
| 64 | + * |
|
| 65 | + * @ORM\Column(name="adress", type="string", length=255, nullable=true) |
|
| 66 | + */ |
|
| 67 | + private $adress; |
|
| 68 | + |
|
| 69 | + /** |
|
| 70 | + * @var string |
|
| 71 | + * |
|
| 72 | + * @ORM\Column(name="postal_code", type="string", length=100, nullable=true) |
|
| 73 | + */ |
|
| 74 | + private $postalCode; |
|
| 75 | + |
|
| 76 | + /** |
|
| 77 | + * @var string |
|
| 78 | + * |
|
| 79 | + * @ORM\Column(name="country", type="string", length=100, nullable=true) |
|
| 80 | + */ |
|
| 81 | + private $country; |
|
| 82 | + |
|
| 83 | + /** |
|
| 84 | + * @var string |
|
| 85 | + * |
|
| 86 | + * @ORM\Column(name="state", type="string", length=255, nullable=true) |
|
| 87 | + */ |
|
| 88 | + private $state; |
|
| 89 | + |
|
| 90 | + /** |
|
| 91 | + * @var string |
|
| 92 | + * |
|
| 93 | + * @ORM\Column(name="access_rights", type="text", nullable=true) |
|
| 94 | + */ |
|
| 95 | + private $accessRights; |
|
| 96 | 96 | |
| 97 | 97 | /** |
| 98 | 98 | * @var boolean |
@@ -117,37 +117,37 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | private $updateDate; |
| 119 | 119 | |
| 120 | - /** |
|
| 121 | - * @return int |
|
| 122 | - */ |
|
| 123 | - public function getId() |
|
| 124 | - { |
|
| 125 | - return $this->id; |
|
| 126 | - } |
|
| 127 | - |
|
| 128 | - /** |
|
| 129 | - * @param int $id |
|
| 130 | - */ |
|
| 131 | - public function setId($id) |
|
| 132 | - { |
|
| 133 | - $this->id = $id; |
|
| 134 | - } |
|
| 135 | - |
|
| 136 | - /** |
|
| 137 | - * @return string |
|
| 138 | - */ |
|
| 139 | - public function getGuid() |
|
| 140 | - { |
|
| 141 | - return $this->guid; |
|
| 142 | - } |
|
| 143 | - |
|
| 144 | - /** |
|
| 145 | - * @param string $guid |
|
| 146 | - */ |
|
| 147 | - public function setGuid($guid) |
|
| 148 | - { |
|
| 149 | - $this->guid = $guid; |
|
| 150 | - } |
|
| 120 | + /** |
|
| 121 | + * @return int |
|
| 122 | + */ |
|
| 123 | + public function getId() |
|
| 124 | + { |
|
| 125 | + return $this->id; |
|
| 126 | + } |
|
| 127 | + |
|
| 128 | + /** |
|
| 129 | + * @param int $id |
|
| 130 | + */ |
|
| 131 | + public function setId($id) |
|
| 132 | + { |
|
| 133 | + $this->id = $id; |
|
| 134 | + } |
|
| 135 | + |
|
| 136 | + /** |
|
| 137 | + * @return string |
|
| 138 | + */ |
|
| 139 | + public function getGuid() |
|
| 140 | + { |
|
| 141 | + return $this->guid; |
|
| 142 | + } |
|
| 143 | + |
|
| 144 | + /** |
|
| 145 | + * @param string $guid |
|
| 146 | + */ |
|
| 147 | + public function setGuid($guid) |
|
| 148 | + { |
|
| 149 | + $this->guid = $guid; |
|
| 150 | + } |
|
| 151 | 151 | |
| 152 | 152 | /** |
| 153 | 153 | * @return AccessRight |
@@ -181,133 +181,133 @@ discard block |
||
| 181 | 181 | $this->admin = $admin; |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | - /** |
|
| 185 | - * @return string |
|
| 186 | - */ |
|
| 187 | - public function getFirstname() |
|
| 188 | - { |
|
| 189 | - return $this->firstname; |
|
| 190 | - } |
|
| 191 | - |
|
| 192 | - /** |
|
| 193 | - * @param string $firstname |
|
| 194 | - */ |
|
| 195 | - public function setFirstname($firstname) |
|
| 196 | - { |
|
| 197 | - $this->firstname = $firstname; |
|
| 198 | - } |
|
| 199 | - |
|
| 200 | - /** |
|
| 201 | - * @return string |
|
| 202 | - */ |
|
| 203 | - public function getLastname() |
|
| 204 | - { |
|
| 205 | - return $this->lastname; |
|
| 206 | - } |
|
| 207 | - |
|
| 208 | - /** |
|
| 209 | - * @param string $lastname |
|
| 210 | - */ |
|
| 211 | - public function setLastname($lastname) |
|
| 212 | - { |
|
| 213 | - $this->lastname = $lastname; |
|
| 214 | - } |
|
| 215 | - |
|
| 216 | - /** |
|
| 217 | - * @return string |
|
| 218 | - */ |
|
| 219 | - public function getAdress() |
|
| 220 | - { |
|
| 221 | - return $this->adress; |
|
| 222 | - } |
|
| 223 | - |
|
| 224 | - /** |
|
| 225 | - * @param string $adress |
|
| 226 | - */ |
|
| 227 | - public function setAdress($adress) |
|
| 228 | - { |
|
| 229 | - $this->adress = $adress; |
|
| 230 | - } |
|
| 231 | - |
|
| 232 | - /** |
|
| 233 | - * @return string |
|
| 234 | - */ |
|
| 235 | - public function getPostalCode() |
|
| 236 | - { |
|
| 237 | - return $this->postalCode; |
|
| 238 | - } |
|
| 239 | - |
|
| 240 | - /** |
|
| 241 | - * @param string $postalCode |
|
| 242 | - */ |
|
| 243 | - public function setPostalCode($postalCode) |
|
| 244 | - { |
|
| 245 | - $this->postalCode = $postalCode; |
|
| 246 | - } |
|
| 247 | - |
|
| 248 | - /** |
|
| 249 | - * @return string |
|
| 250 | - */ |
|
| 251 | - public function getCountry() |
|
| 252 | - { |
|
| 253 | - return $this->country; |
|
| 254 | - } |
|
| 255 | - |
|
| 256 | - /** |
|
| 257 | - * @param string $country |
|
| 258 | - */ |
|
| 259 | - public function setCountry($country) |
|
| 260 | - { |
|
| 261 | - $this->country = $country; |
|
| 262 | - } |
|
| 263 | - |
|
| 264 | - /** |
|
| 265 | - * @return string |
|
| 266 | - */ |
|
| 267 | - public function getState() |
|
| 268 | - { |
|
| 269 | - return $this->state; |
|
| 270 | - } |
|
| 271 | - |
|
| 272 | - /** |
|
| 273 | - * @param string $state |
|
| 274 | - */ |
|
| 275 | - public function setState($state) |
|
| 276 | - { |
|
| 277 | - $this->state = $state; |
|
| 278 | - } |
|
| 279 | - |
|
| 280 | - /** |
|
| 281 | - * @return string |
|
| 282 | - */ |
|
| 283 | - public function getAccessRights() |
|
| 284 | - { |
|
| 285 | - return $this->accessRights; |
|
| 286 | - } |
|
| 287 | - |
|
| 288 | - /** |
|
| 289 | - * @param string $accessRights |
|
| 290 | - */ |
|
| 291 | - public function setAccessRights($accessRights) |
|
| 292 | - { |
|
| 293 | - $this->accessRights = $accessRights; |
|
| 294 | - } |
|
| 295 | - |
|
| 296 | - /** |
|
| 297 | - * @return \DateTime |
|
| 298 | - */ |
|
| 299 | - public function getCreationDate() |
|
| 300 | - { |
|
| 301 | - return $this->creationDate; |
|
| 302 | - } |
|
| 303 | - |
|
| 304 | - /** |
|
| 305 | - * @param \DateTime $creationDate |
|
| 306 | - */ |
|
| 307 | - public function setCreationDate($creationDate) |
|
| 308 | - { |
|
| 309 | - $this->creationDate = $creationDate; |
|
| 310 | - } |
|
| 184 | + /** |
|
| 185 | + * @return string |
|
| 186 | + */ |
|
| 187 | + public function getFirstname() |
|
| 188 | + { |
|
| 189 | + return $this->firstname; |
|
| 190 | + } |
|
| 191 | + |
|
| 192 | + /** |
|
| 193 | + * @param string $firstname |
|
| 194 | + */ |
|
| 195 | + public function setFirstname($firstname) |
|
| 196 | + { |
|
| 197 | + $this->firstname = $firstname; |
|
| 198 | + } |
|
| 199 | + |
|
| 200 | + /** |
|
| 201 | + * @return string |
|
| 202 | + */ |
|
| 203 | + public function getLastname() |
|
| 204 | + { |
|
| 205 | + return $this->lastname; |
|
| 206 | + } |
|
| 207 | + |
|
| 208 | + /** |
|
| 209 | + * @param string $lastname |
|
| 210 | + */ |
|
| 211 | + public function setLastname($lastname) |
|
| 212 | + { |
|
| 213 | + $this->lastname = $lastname; |
|
| 214 | + } |
|
| 215 | + |
|
| 216 | + /** |
|
| 217 | + * @return string |
|
| 218 | + */ |
|
| 219 | + public function getAdress() |
|
| 220 | + { |
|
| 221 | + return $this->adress; |
|
| 222 | + } |
|
| 223 | + |
|
| 224 | + /** |
|
| 225 | + * @param string $adress |
|
| 226 | + */ |
|
| 227 | + public function setAdress($adress) |
|
| 228 | + { |
|
| 229 | + $this->adress = $adress; |
|
| 230 | + } |
|
| 231 | + |
|
| 232 | + /** |
|
| 233 | + * @return string |
|
| 234 | + */ |
|
| 235 | + public function getPostalCode() |
|
| 236 | + { |
|
| 237 | + return $this->postalCode; |
|
| 238 | + } |
|
| 239 | + |
|
| 240 | + /** |
|
| 241 | + * @param string $postalCode |
|
| 242 | + */ |
|
| 243 | + public function setPostalCode($postalCode) |
|
| 244 | + { |
|
| 245 | + $this->postalCode = $postalCode; |
|
| 246 | + } |
|
| 247 | + |
|
| 248 | + /** |
|
| 249 | + * @return string |
|
| 250 | + */ |
|
| 251 | + public function getCountry() |
|
| 252 | + { |
|
| 253 | + return $this->country; |
|
| 254 | + } |
|
| 255 | + |
|
| 256 | + /** |
|
| 257 | + * @param string $country |
|
| 258 | + */ |
|
| 259 | + public function setCountry($country) |
|
| 260 | + { |
|
| 261 | + $this->country = $country; |
|
| 262 | + } |
|
| 263 | + |
|
| 264 | + /** |
|
| 265 | + * @return string |
|
| 266 | + */ |
|
| 267 | + public function getState() |
|
| 268 | + { |
|
| 269 | + return $this->state; |
|
| 270 | + } |
|
| 271 | + |
|
| 272 | + /** |
|
| 273 | + * @param string $state |
|
| 274 | + */ |
|
| 275 | + public function setState($state) |
|
| 276 | + { |
|
| 277 | + $this->state = $state; |
|
| 278 | + } |
|
| 279 | + |
|
| 280 | + /** |
|
| 281 | + * @return string |
|
| 282 | + */ |
|
| 283 | + public function getAccessRights() |
|
| 284 | + { |
|
| 285 | + return $this->accessRights; |
|
| 286 | + } |
|
| 287 | + |
|
| 288 | + /** |
|
| 289 | + * @param string $accessRights |
|
| 290 | + */ |
|
| 291 | + public function setAccessRights($accessRights) |
|
| 292 | + { |
|
| 293 | + $this->accessRights = $accessRights; |
|
| 294 | + } |
|
| 295 | + |
|
| 296 | + /** |
|
| 297 | + * @return \DateTime |
|
| 298 | + */ |
|
| 299 | + public function getCreationDate() |
|
| 300 | + { |
|
| 301 | + return $this->creationDate; |
|
| 302 | + } |
|
| 303 | + |
|
| 304 | + /** |
|
| 305 | + * @param \DateTime $creationDate |
|
| 306 | + */ |
|
| 307 | + public function setCreationDate($creationDate) |
|
| 308 | + { |
|
| 309 | + $this->creationDate = $creationDate; |
|
| 310 | + } |
|
| 311 | 311 | |
| 312 | 312 | /** |
| 313 | 313 | * @return boolean |
@@ -325,21 +325,21 @@ discard block |
||
| 325 | 325 | $this->archived = $archived; |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | - /** |
|
| 329 | - * @return \DateTime |
|
| 330 | - */ |
|
| 331 | - public function getUpdateDate() |
|
| 332 | - { |
|
| 333 | - return $this->updateDate; |
|
| 334 | - } |
|
| 335 | - |
|
| 336 | - /** |
|
| 337 | - * @param \DateTime $updateDate |
|
| 338 | - */ |
|
| 339 | - public function setUpdateDate($updateDate) |
|
| 340 | - { |
|
| 341 | - $this->updateDate = $updateDate; |
|
| 342 | - } |
|
| 328 | + /** |
|
| 329 | + * @return \DateTime |
|
| 330 | + */ |
|
| 331 | + public function getUpdateDate() |
|
| 332 | + { |
|
| 333 | + return $this->updateDate; |
|
| 334 | + } |
|
| 335 | + |
|
| 336 | + /** |
|
| 337 | + * @param \DateTime $updateDate |
|
| 338 | + */ |
|
| 339 | + public function setUpdateDate($updateDate) |
|
| 340 | + { |
|
| 341 | + $this->updateDate = $updateDate; |
|
| 342 | + } |
|
| 343 | 343 | |
| 344 | 344 | |
| 345 | 345 | } |
@@ -12,8 +12,7 @@ discard block |
||
| 12 | 12 | * @ORM\Entity |
| 13 | 13 | * @ORM\EntityListeners({"Ribs\RibsAdminBundle\EventListener\GuidAwareListener"}) |
| 14 | 14 | */ |
| 15 | -class User |
|
| 16 | -{ |
|
| 15 | +class User { |
|
| 17 | 16 | /** |
| 18 | 17 | * @var integer |
| 19 | 18 | * |
@@ -120,48 +119,42 @@ discard block |
||
| 120 | 119 | /** |
| 121 | 120 | * @return int |
| 122 | 121 | */ |
| 123 | - public function getId() |
|
| 124 | - { |
|
| 122 | + public function getId() { |
|
| 125 | 123 | return $this->id; |
| 126 | 124 | } |
| 127 | 125 | |
| 128 | 126 | /** |
| 129 | 127 | * @param int $id |
| 130 | 128 | */ |
| 131 | - public function setId($id) |
|
| 132 | - { |
|
| 129 | + public function setId($id) { |
|
| 133 | 130 | $this->id = $id; |
| 134 | 131 | } |
| 135 | 132 | |
| 136 | 133 | /** |
| 137 | 134 | * @return string |
| 138 | 135 | */ |
| 139 | - public function getGuid() |
|
| 140 | - { |
|
| 136 | + public function getGuid() { |
|
| 141 | 137 | return $this->guid; |
| 142 | 138 | } |
| 143 | 139 | |
| 144 | 140 | /** |
| 145 | 141 | * @param string $guid |
| 146 | 142 | */ |
| 147 | - public function setGuid($guid) |
|
| 148 | - { |
|
| 143 | + public function setGuid($guid) { |
|
| 149 | 144 | $this->guid = $guid; |
| 150 | 145 | } |
| 151 | 146 | |
| 152 | 147 | /** |
| 153 | 148 | * @return AccessRight |
| 154 | 149 | */ |
| 155 | - public function getAccessRightList() |
|
| 156 | - { |
|
| 150 | + public function getAccessRightList() { |
|
| 157 | 151 | return $this->accessRightList; |
| 158 | 152 | } |
| 159 | 153 | |
| 160 | 154 | /** |
| 161 | 155 | * @param AccessRight $accessRightList |
| 162 | 156 | */ |
| 163 | - public function setAccessRightList(AccessRight $accessRightList) |
|
| 164 | - { |
|
| 157 | + public function setAccessRightList(AccessRight $accessRightList) { |
|
| 165 | 158 | $this->accessRightList = $accessRightList; |
| 166 | 159 | } |
| 167 | 160 | |
@@ -176,136 +169,119 @@ discard block |
||
| 176 | 169 | /** |
| 177 | 170 | * @param bool $admin |
| 178 | 171 | */ |
| 179 | - public function setAdmin(bool $admin) |
|
| 180 | - { |
|
| 172 | + public function setAdmin(bool $admin) { |
|
| 181 | 173 | $this->admin = $admin; |
| 182 | 174 | } |
| 183 | 175 | |
| 184 | 176 | /** |
| 185 | 177 | * @return string |
| 186 | 178 | */ |
| 187 | - public function getFirstname() |
|
| 188 | - { |
|
| 179 | + public function getFirstname() { |
|
| 189 | 180 | return $this->firstname; |
| 190 | 181 | } |
| 191 | 182 | |
| 192 | 183 | /** |
| 193 | 184 | * @param string $firstname |
| 194 | 185 | */ |
| 195 | - public function setFirstname($firstname) |
|
| 196 | - { |
|
| 186 | + public function setFirstname($firstname) { |
|
| 197 | 187 | $this->firstname = $firstname; |
| 198 | 188 | } |
| 199 | 189 | |
| 200 | 190 | /** |
| 201 | 191 | * @return string |
| 202 | 192 | */ |
| 203 | - public function getLastname() |
|
| 204 | - { |
|
| 193 | + public function getLastname() { |
|
| 205 | 194 | return $this->lastname; |
| 206 | 195 | } |
| 207 | 196 | |
| 208 | 197 | /** |
| 209 | 198 | * @param string $lastname |
| 210 | 199 | */ |
| 211 | - public function setLastname($lastname) |
|
| 212 | - { |
|
| 200 | + public function setLastname($lastname) { |
|
| 213 | 201 | $this->lastname = $lastname; |
| 214 | 202 | } |
| 215 | 203 | |
| 216 | 204 | /** |
| 217 | 205 | * @return string |
| 218 | 206 | */ |
| 219 | - public function getAdress() |
|
| 220 | - { |
|
| 207 | + public function getAdress() { |
|
| 221 | 208 | return $this->adress; |
| 222 | 209 | } |
| 223 | 210 | |
| 224 | 211 | /** |
| 225 | 212 | * @param string $adress |
| 226 | 213 | */ |
| 227 | - public function setAdress($adress) |
|
| 228 | - { |
|
| 214 | + public function setAdress($adress) { |
|
| 229 | 215 | $this->adress = $adress; |
| 230 | 216 | } |
| 231 | 217 | |
| 232 | 218 | /** |
| 233 | 219 | * @return string |
| 234 | 220 | */ |
| 235 | - public function getPostalCode() |
|
| 236 | - { |
|
| 221 | + public function getPostalCode() { |
|
| 237 | 222 | return $this->postalCode; |
| 238 | 223 | } |
| 239 | 224 | |
| 240 | 225 | /** |
| 241 | 226 | * @param string $postalCode |
| 242 | 227 | */ |
| 243 | - public function setPostalCode($postalCode) |
|
| 244 | - { |
|
| 228 | + public function setPostalCode($postalCode) { |
|
| 245 | 229 | $this->postalCode = $postalCode; |
| 246 | 230 | } |
| 247 | 231 | |
| 248 | 232 | /** |
| 249 | 233 | * @return string |
| 250 | 234 | */ |
| 251 | - public function getCountry() |
|
| 252 | - { |
|
| 235 | + public function getCountry() { |
|
| 253 | 236 | return $this->country; |
| 254 | 237 | } |
| 255 | 238 | |
| 256 | 239 | /** |
| 257 | 240 | * @param string $country |
| 258 | 241 | */ |
| 259 | - public function setCountry($country) |
|
| 260 | - { |
|
| 242 | + public function setCountry($country) { |
|
| 261 | 243 | $this->country = $country; |
| 262 | 244 | } |
| 263 | 245 | |
| 264 | 246 | /** |
| 265 | 247 | * @return string |
| 266 | 248 | */ |
| 267 | - public function getState() |
|
| 268 | - { |
|
| 249 | + public function getState() { |
|
| 269 | 250 | return $this->state; |
| 270 | 251 | } |
| 271 | 252 | |
| 272 | 253 | /** |
| 273 | 254 | * @param string $state |
| 274 | 255 | */ |
| 275 | - public function setState($state) |
|
| 276 | - { |
|
| 256 | + public function setState($state) { |
|
| 277 | 257 | $this->state = $state; |
| 278 | 258 | } |
| 279 | 259 | |
| 280 | 260 | /** |
| 281 | 261 | * @return string |
| 282 | 262 | */ |
| 283 | - public function getAccessRights() |
|
| 284 | - { |
|
| 263 | + public function getAccessRights() { |
|
| 285 | 264 | return $this->accessRights; |
| 286 | 265 | } |
| 287 | 266 | |
| 288 | 267 | /** |
| 289 | 268 | * @param string $accessRights |
| 290 | 269 | */ |
| 291 | - public function setAccessRights($accessRights) |
|
| 292 | - { |
|
| 270 | + public function setAccessRights($accessRights) { |
|
| 293 | 271 | $this->accessRights = $accessRights; |
| 294 | 272 | } |
| 295 | 273 | |
| 296 | 274 | /** |
| 297 | 275 | * @return \DateTime |
| 298 | 276 | */ |
| 299 | - public function getCreationDate() |
|
| 300 | - { |
|
| 277 | + public function getCreationDate() { |
|
| 301 | 278 | return $this->creationDate; |
| 302 | 279 | } |
| 303 | 280 | |
| 304 | 281 | /** |
| 305 | 282 | * @param \DateTime $creationDate |
| 306 | 283 | */ |
| 307 | - public function setCreationDate($creationDate) |
|
| 308 | - { |
|
| 284 | + public function setCreationDate($creationDate) { |
|
| 309 | 285 | $this->creationDate = $creationDate; |
| 310 | 286 | } |
| 311 | 287 | |
@@ -320,24 +296,21 @@ discard block |
||
| 320 | 296 | /** |
| 321 | 297 | * @param boolean $archived |
| 322 | 298 | */ |
| 323 | - public function setArchived(bool $archived) |
|
| 324 | - { |
|
| 299 | + public function setArchived(bool $archived) { |
|
| 325 | 300 | $this->archived = $archived; |
| 326 | 301 | } |
| 327 | 302 | |
| 328 | 303 | /** |
| 329 | 304 | * @return \DateTime |
| 330 | 305 | */ |
| 331 | - public function getUpdateDate() |
|
| 332 | - { |
|
| 306 | + public function getUpdateDate() { |
|
| 333 | 307 | return $this->updateDate; |
| 334 | 308 | } |
| 335 | 309 | |
| 336 | 310 | /** |
| 337 | 311 | * @param \DateTime $updateDate |
| 338 | 312 | */ |
| 339 | - public function setUpdateDate($updateDate) |
|
| 340 | - { |
|
| 313 | + public function setUpdateDate($updateDate) { |
|
| 341 | 314 | $this->updateDate = $updateDate; |
| 342 | 315 | } |
| 343 | 316 | |
@@ -6,14 +6,12 @@ |
||
| 6 | 6 | use Ribs\RibsAdminBundle\Entity\AccessRight; |
| 7 | 7 | use Ribs\RibsAdminBundle\Entity\User; |
| 8 | 8 | |
| 9 | -class AccessRightRepository extends EntityRepository |
|
| 10 | -{ |
|
| 9 | +class AccessRightRepository extends EntityRepository { |
|
| 11 | 10 | /** |
| 12 | 11 | * @param AccessRight $access_right |
| 13 | 12 | * function that delete all user which are in a list of rights |
| 14 | 13 | */ |
| 15 | - public function deleteAllUsersList(AccessRight $access_right) |
|
| 16 | - { |
|
| 14 | + public function deleteAllUsersList(AccessRight $access_right) { |
|
| 17 | 15 | $query = $this->getEntityManager()->getConnection()->prepare("UPDATE user SET id_access_right = NULL WHERE |
| 18 | 16 | id_access_right = :id_access_right |
| 19 | 17 | "); |