@@ -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 | } |
@@ -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 AccessRightsController extends Controller |
|
| 11 | -{ |
|
| 10 | +class AccessRightsController extends Controller { |
|
| 12 | 11 | /** |
| 13 | 12 | * @Route("/access-rights-management/", name="ribsadmin_access_rights") |
| 14 | 13 | * @return Response |
@@ -34,7 +33,8 @@ discard block |
||
| 34 | 33 | |
| 35 | 34 | if ($guid === null) { |
| 36 | 35 | $access_right = new AccessRight(); |
| 37 | - } else { |
|
| 36 | + } |
|
| 37 | + else { |
|
| 38 | 38 | $access_right = $em->getRepository("RibsAdminBundle:AccessRight")->findOneBy(["guid" => $guid]); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -6,20 +6,17 @@ |
||
| 6 | 6 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 7 | 7 | use Ramsey\Uuid\Uuid; |
| 8 | 8 | |
| 9 | -class GuidAwareListener |
|
| 10 | -{ |
|
| 9 | +class GuidAwareListener { |
|
| 11 | 10 | /** |
| 12 | 11 | * @var ContainerInterface |
| 13 | 12 | */ |
| 14 | 13 | private $container; |
| 15 | 14 | |
| 16 | - public function __construct(ContainerInterface $container) |
|
| 17 | - { |
|
| 15 | + public function __construct(ContainerInterface $container) { |
|
| 18 | 16 | $this->container = $container; |
| 19 | 17 | } |
| 20 | 18 | |
| 21 | - public function prePersist($entity, LifecycleEventArgs $events) |
|
| 22 | - { |
|
| 19 | + public function prePersist($entity, LifecycleEventArgs $events) { |
|
| 23 | 20 | if ($entity->getGuid() === null) { |
| 24 | 21 | $entity->setGuid((string)Uuid::uuid4()); |
| 25 | 22 | } |
@@ -11,8 +11,7 @@ discard block |
||
| 11 | 11 | * @ORM\Entity |
| 12 | 12 | * @ORM\EntityListeners({"Ribs\RibsAdminBundle\EventListener\GuidAwareListener"}) |
| 13 | 13 | */ |
| 14 | -class Page |
|
| 15 | -{ |
|
| 14 | +class Page { |
|
| 16 | 15 | /** |
| 17 | 16 | * @var integer |
| 18 | 17 | * |
@@ -91,160 +90,140 @@ discard block |
||
| 91 | 90 | /** |
| 92 | 91 | * @return int |
| 93 | 92 | */ |
| 94 | - public function getId() |
|
| 95 | - { |
|
| 93 | + public function getId() { |
|
| 96 | 94 | return $this->id; |
| 97 | 95 | } |
| 98 | 96 | |
| 99 | 97 | /** |
| 100 | 98 | * @param int $id |
| 101 | 99 | */ |
| 102 | - public function setId($id) |
|
| 103 | - { |
|
| 100 | + public function setId($id) { |
|
| 104 | 101 | $this->id = $id; |
| 105 | 102 | } |
| 106 | 103 | |
| 107 | 104 | /** |
| 108 | 105 | * @return string |
| 109 | 106 | */ |
| 110 | - public function getGuid() |
|
| 111 | - { |
|
| 107 | + public function getGuid() { |
|
| 112 | 108 | return $this->guid; |
| 113 | 109 | } |
| 114 | 110 | |
| 115 | 111 | /** |
| 116 | 112 | * @param string $guid |
| 117 | 113 | */ |
| 118 | - public function setGuid($guid) |
|
| 119 | - { |
|
| 114 | + public function setGuid($guid) { |
|
| 120 | 115 | $this->guid = $guid; |
| 121 | 116 | } |
| 122 | 117 | |
| 123 | 118 | /** |
| 124 | 119 | * @return string |
| 125 | 120 | */ |
| 126 | - public function getTitleTag() |
|
| 127 | - { |
|
| 121 | + public function getTitleTag() { |
|
| 128 | 122 | return $this->titleTag; |
| 129 | 123 | } |
| 130 | 124 | |
| 131 | 125 | /** |
| 132 | 126 | * @param string $titleTag |
| 133 | 127 | */ |
| 134 | - public function setTitleTag($titleTag) |
|
| 135 | - { |
|
| 128 | + public function setTitleTag($titleTag) { |
|
| 136 | 129 | $this->titleTag = $titleTag; |
| 137 | 130 | } |
| 138 | 131 | |
| 139 | 132 | /** |
| 140 | 133 | * @return string |
| 141 | 134 | */ |
| 142 | - public function getDescriptionTag() |
|
| 143 | - { |
|
| 135 | + public function getDescriptionTag() { |
|
| 144 | 136 | return $this->descriptionTag; |
| 145 | 137 | } |
| 146 | 138 | |
| 147 | 139 | /** |
| 148 | 140 | * @param string $descriptionTag |
| 149 | 141 | */ |
| 150 | - public function setDescriptionTag($descriptionTag) |
|
| 151 | - { |
|
| 142 | + public function setDescriptionTag($descriptionTag) { |
|
| 152 | 143 | $this->descriptionTag = $descriptionTag; |
| 153 | 144 | } |
| 154 | 145 | |
| 155 | 146 | /** |
| 156 | 147 | * @return string |
| 157 | 148 | */ |
| 158 | - public function getTitle() |
|
| 159 | - { |
|
| 149 | + public function getTitle() { |
|
| 160 | 150 | return $this->title; |
| 161 | 151 | } |
| 162 | 152 | |
| 163 | 153 | /** |
| 164 | 154 | * @param string $title |
| 165 | 155 | */ |
| 166 | - public function setTitle($title) |
|
| 167 | - { |
|
| 156 | + public function setTitle($title) { |
|
| 168 | 157 | $this->title = $title; |
| 169 | 158 | } |
| 170 | 159 | |
| 171 | 160 | /** |
| 172 | 161 | * @return string |
| 173 | 162 | */ |
| 174 | - public function getContent() |
|
| 175 | - { |
|
| 163 | + public function getContent() { |
|
| 176 | 164 | return $this->content; |
| 177 | 165 | } |
| 178 | 166 | |
| 179 | 167 | /** |
| 180 | 168 | * @param string $content |
| 181 | 169 | */ |
| 182 | - public function setContent($content) |
|
| 183 | - { |
|
| 170 | + public function setContent($content) { |
|
| 184 | 171 | $this->content = $content; |
| 185 | 172 | } |
| 186 | 173 | |
| 187 | 174 | /** |
| 188 | 175 | * @return int |
| 189 | 176 | */ |
| 190 | - public function getActive() |
|
| 191 | - { |
|
| 177 | + public function getActive() { |
|
| 192 | 178 | return $this->active; |
| 193 | 179 | } |
| 194 | 180 | |
| 195 | 181 | /** |
| 196 | 182 | * @param int $active |
| 197 | 183 | */ |
| 198 | - public function setActive($active) |
|
| 199 | - { |
|
| 184 | + public function setActive($active) { |
|
| 200 | 185 | $this->active = $active; |
| 201 | 186 | } |
| 202 | 187 | |
| 203 | 188 | /** |
| 204 | 189 | * @return int |
| 205 | 190 | */ |
| 206 | - public function getOrder() |
|
| 207 | - { |
|
| 191 | + public function getOrder() { |
|
| 208 | 192 | return $this->order; |
| 209 | 193 | } |
| 210 | 194 | |
| 211 | 195 | /** |
| 212 | 196 | * @param int $order |
| 213 | 197 | */ |
| 214 | - public function setOrder($order) |
|
| 215 | - { |
|
| 198 | + public function setOrder($order) { |
|
| 216 | 199 | $this->order = $order; |
| 217 | 200 | } |
| 218 | 201 | |
| 219 | 202 | /** |
| 220 | 203 | * @return int |
| 221 | 204 | */ |
| 222 | - public function getDisplayed() |
|
| 223 | - { |
|
| 205 | + public function getDisplayed() { |
|
| 224 | 206 | return $this->displayed; |
| 225 | 207 | } |
| 226 | 208 | |
| 227 | 209 | /** |
| 228 | 210 | * @param int $displayed |
| 229 | 211 | */ |
| 230 | - public function setDisplayed($displayed) |
|
| 231 | - { |
|
| 212 | + public function setDisplayed($displayed) { |
|
| 232 | 213 | $this->displayed = $displayed; |
| 233 | 214 | } |
| 234 | 215 | |
| 235 | 216 | /** |
| 236 | 217 | * @return \Page |
| 237 | 218 | */ |
| 238 | - public function getParent() |
|
| 239 | - { |
|
| 219 | + public function getParent() { |
|
| 240 | 220 | return $this->parent; |
| 241 | 221 | } |
| 242 | 222 | |
| 243 | 223 | /** |
| 244 | 224 | * @param \Page $parent |
| 245 | 225 | */ |
| 246 | - public function setParent($parent) |
|
| 247 | - { |
|
| 226 | + public function setParent($parent) { |
|
| 248 | 227 | $this->parent = $parent; |
| 249 | 228 | } |
| 250 | 229 | |
@@ -11,8 +11,7 @@ discard block |
||
| 11 | 11 | * @ORM\Entity |
| 12 | 12 | * @ORM\EntityListeners({"Ribs\RibsAdminBundle\EventListener\GuidAwareListener"}) |
| 13 | 13 | */ |
| 14 | -class User |
|
| 15 | -{ |
|
| 14 | +class User { |
|
| 16 | 15 | /** |
| 17 | 16 | * @var integer |
| 18 | 17 | * |
@@ -110,32 +109,28 @@ discard block |
||
| 110 | 109 | /** |
| 111 | 110 | * @return int |
| 112 | 111 | */ |
| 113 | - public function getId() |
|
| 114 | - { |
|
| 112 | + public function getId() { |
|
| 115 | 113 | return $this->id; |
| 116 | 114 | } |
| 117 | 115 | |
| 118 | 116 | /** |
| 119 | 117 | * @param int $id |
| 120 | 118 | */ |
| 121 | - public function setId($id) |
|
| 122 | - { |
|
| 119 | + public function setId($id) { |
|
| 123 | 120 | $this->id = $id; |
| 124 | 121 | } |
| 125 | 122 | |
| 126 | 123 | /** |
| 127 | 124 | * @return string |
| 128 | 125 | */ |
| 129 | - public function getGuid() |
|
| 130 | - { |
|
| 126 | + public function getGuid() { |
|
| 131 | 127 | return $this->guid; |
| 132 | 128 | } |
| 133 | 129 | |
| 134 | 130 | /** |
| 135 | 131 | * @param string $guid |
| 136 | 132 | */ |
| 137 | - public function setGuid($guid) |
|
| 138 | - { |
|
| 133 | + public function setGuid($guid) { |
|
| 139 | 134 | $this->guid = $guid; |
| 140 | 135 | } |
| 141 | 136 | |
@@ -150,136 +145,119 @@ discard block |
||
| 150 | 145 | /** |
| 151 | 146 | * @param AccessRight $accessRightList |
| 152 | 147 | */ |
| 153 | - public function setAccessRightList(AccessRight $accessRightList) |
|
| 154 | - { |
|
| 148 | + public function setAccessRightList(AccessRight $accessRightList) { |
|
| 155 | 149 | $this->accessRightList = $accessRightList; |
| 156 | 150 | } |
| 157 | 151 | |
| 158 | 152 | /** |
| 159 | 153 | * @return string |
| 160 | 154 | */ |
| 161 | - public function getFirstname() |
|
| 162 | - { |
|
| 155 | + public function getFirstname() { |
|
| 163 | 156 | return $this->firstname; |
| 164 | 157 | } |
| 165 | 158 | |
| 166 | 159 | /** |
| 167 | 160 | * @param string $firstname |
| 168 | 161 | */ |
| 169 | - public function setFirstname($firstname) |
|
| 170 | - { |
|
| 162 | + public function setFirstname($firstname) { |
|
| 171 | 163 | $this->firstname = $firstname; |
| 172 | 164 | } |
| 173 | 165 | |
| 174 | 166 | /** |
| 175 | 167 | * @return string |
| 176 | 168 | */ |
| 177 | - public function getLastname() |
|
| 178 | - { |
|
| 169 | + public function getLastname() { |
|
| 179 | 170 | return $this->lastname; |
| 180 | 171 | } |
| 181 | 172 | |
| 182 | 173 | /** |
| 183 | 174 | * @param string $lastname |
| 184 | 175 | */ |
| 185 | - public function setLastname($lastname) |
|
| 186 | - { |
|
| 176 | + public function setLastname($lastname) { |
|
| 187 | 177 | $this->lastname = $lastname; |
| 188 | 178 | } |
| 189 | 179 | |
| 190 | 180 | /** |
| 191 | 181 | * @return string |
| 192 | 182 | */ |
| 193 | - public function getAdress() |
|
| 194 | - { |
|
| 183 | + public function getAdress() { |
|
| 195 | 184 | return $this->adress; |
| 196 | 185 | } |
| 197 | 186 | |
| 198 | 187 | /** |
| 199 | 188 | * @param string $adress |
| 200 | 189 | */ |
| 201 | - public function setAdress($adress) |
|
| 202 | - { |
|
| 190 | + public function setAdress($adress) { |
|
| 203 | 191 | $this->adress = $adress; |
| 204 | 192 | } |
| 205 | 193 | |
| 206 | 194 | /** |
| 207 | 195 | * @return string |
| 208 | 196 | */ |
| 209 | - public function getPostalCode() |
|
| 210 | - { |
|
| 197 | + public function getPostalCode() { |
|
| 211 | 198 | return $this->postalCode; |
| 212 | 199 | } |
| 213 | 200 | |
| 214 | 201 | /** |
| 215 | 202 | * @param string $postalCode |
| 216 | 203 | */ |
| 217 | - public function setPostalCode($postalCode) |
|
| 218 | - { |
|
| 204 | + public function setPostalCode($postalCode) { |
|
| 219 | 205 | $this->postalCode = $postalCode; |
| 220 | 206 | } |
| 221 | 207 | |
| 222 | 208 | /** |
| 223 | 209 | * @return string |
| 224 | 210 | */ |
| 225 | - public function getCountry() |
|
| 226 | - { |
|
| 211 | + public function getCountry() { |
|
| 227 | 212 | return $this->country; |
| 228 | 213 | } |
| 229 | 214 | |
| 230 | 215 | /** |
| 231 | 216 | * @param string $country |
| 232 | 217 | */ |
| 233 | - public function setCountry($country) |
|
| 234 | - { |
|
| 218 | + public function setCountry($country) { |
|
| 235 | 219 | $this->country = $country; |
| 236 | 220 | } |
| 237 | 221 | |
| 238 | 222 | /** |
| 239 | 223 | * @return string |
| 240 | 224 | */ |
| 241 | - public function getState() |
|
| 242 | - { |
|
| 225 | + public function getState() { |
|
| 243 | 226 | return $this->state; |
| 244 | 227 | } |
| 245 | 228 | |
| 246 | 229 | /** |
| 247 | 230 | * @param string $state |
| 248 | 231 | */ |
| 249 | - public function setState($state) |
|
| 250 | - { |
|
| 232 | + public function setState($state) { |
|
| 251 | 233 | $this->state = $state; |
| 252 | 234 | } |
| 253 | 235 | |
| 254 | 236 | /** |
| 255 | 237 | * @return string |
| 256 | 238 | */ |
| 257 | - public function getAccessRights() |
|
| 258 | - { |
|
| 239 | + public function getAccessRights() { |
|
| 259 | 240 | return $this->accessRights; |
| 260 | 241 | } |
| 261 | 242 | |
| 262 | 243 | /** |
| 263 | 244 | * @param string $accessRights |
| 264 | 245 | */ |
| 265 | - public function setAccessRights($accessRights) |
|
| 266 | - { |
|
| 246 | + public function setAccessRights($accessRights) { |
|
| 267 | 247 | $this->accessRights = $accessRights; |
| 268 | 248 | } |
| 269 | 249 | |
| 270 | 250 | /** |
| 271 | 251 | * @return \DateTime |
| 272 | 252 | */ |
| 273 | - public function getCreationDate() |
|
| 274 | - { |
|
| 253 | + public function getCreationDate() { |
|
| 275 | 254 | return $this->creationDate; |
| 276 | 255 | } |
| 277 | 256 | |
| 278 | 257 | /** |
| 279 | 258 | * @param \DateTime $creationDate |
| 280 | 259 | */ |
| 281 | - public function setCreationDate($creationDate) |
|
| 282 | - { |
|
| 260 | + public function setCreationDate($creationDate) { |
|
| 283 | 261 | $this->creationDate = $creationDate; |
| 284 | 262 | } |
| 285 | 263 | |
@@ -294,24 +272,21 @@ discard block |
||
| 294 | 272 | /** |
| 295 | 273 | * @param boolean $archived |
| 296 | 274 | */ |
| 297 | - public function setArchived(bool $archived) |
|
| 298 | - { |
|
| 275 | + public function setArchived(bool $archived) { |
|
| 299 | 276 | $this->archived = $archived; |
| 300 | 277 | } |
| 301 | 278 | |
| 302 | 279 | /** |
| 303 | 280 | * @return \DateTime |
| 304 | 281 | */ |
| 305 | - public function getUpdateDate() |
|
| 306 | - { |
|
| 282 | + public function getUpdateDate() { |
|
| 307 | 283 | return $this->updateDate; |
| 308 | 284 | } |
| 309 | 285 | |
| 310 | 286 | /** |
| 311 | 287 | * @param \DateTime $updateDate |
| 312 | 288 | */ |
| 313 | - public function setUpdateDate($updateDate) |
|
| 314 | - { |
|
| 289 | + public function setUpdateDate($updateDate) { |
|
| 315 | 290 | $this->updateDate = $updateDate; |
| 316 | 291 | } |
| 317 | 292 | |
@@ -12,8 +12,7 @@ discard block |
||
| 12 | 12 | * @ORM\Entity |
| 13 | 13 | * @ORM\EntityListeners({"Ribs\RibsAdminBundle\EventListener\GuidAwareListener"}) |
| 14 | 14 | */ |
| 15 | -class AccessRight |
|
| 16 | -{ |
|
| 15 | +class AccessRight { |
|
| 17 | 16 | /** |
| 18 | 17 | * @var integer |
| 19 | 18 | * |
@@ -68,8 +67,7 @@ discard block |
||
| 68 | 67 | /** |
| 69 | 68 | * AccessRight constructor. |
| 70 | 69 | */ |
| 71 | - public function __construct() |
|
| 72 | - { |
|
| 70 | + public function __construct() { |
|
| 73 | 71 | $this->users = new ArrayCollection(); |
| 74 | 72 | } |
| 75 | 73 | |
@@ -84,8 +82,7 @@ discard block |
||
| 84 | 82 | /** |
| 85 | 83 | * @param int $id |
| 86 | 84 | */ |
| 87 | - public function setId(int $id) |
|
| 88 | - { |
|
| 85 | + public function setId(int $id) { |
|
| 89 | 86 | $this->id = $id; |
| 90 | 87 | } |
| 91 | 88 | |
@@ -100,8 +97,7 @@ discard block |
||
| 100 | 97 | /** |
| 101 | 98 | * @param string $guid |
| 102 | 99 | */ |
| 103 | - public function setGuid(string $guid) |
|
| 104 | - { |
|
| 100 | + public function setGuid(string $guid) { |
|
| 105 | 101 | $this->guid = $guid; |
| 106 | 102 | } |
| 107 | 103 | |
@@ -116,8 +112,7 @@ discard block |
||
| 116 | 112 | /** |
| 117 | 113 | * @param string $name |
| 118 | 114 | */ |
| 119 | - public function setName(string $name) |
|
| 120 | - { |
|
| 115 | + public function setName(string $name) { |
|
| 121 | 116 | $this->name = $name; |
| 122 | 117 | } |
| 123 | 118 | |
@@ -132,8 +127,7 @@ discard block |
||
| 132 | 127 | /** |
| 133 | 128 | * @param string $accessRights |
| 134 | 129 | */ |
| 135 | - public function setAccessRights(string $accessRights) |
|
| 136 | - { |
|
| 130 | + public function setAccessRights(string $accessRights) { |
|
| 137 | 131 | $this->accessRights = $accessRights; |
| 138 | 132 | } |
| 139 | 133 | |
@@ -148,8 +142,7 @@ discard block |
||
| 148 | 142 | /** |
| 149 | 143 | * @param \DateTime $creationDate |
| 150 | 144 | */ |
| 151 | - public function setCreationDate(\DateTime $creationDate) |
|
| 152 | - { |
|
| 145 | + public function setCreationDate(\DateTime $creationDate) { |
|
| 153 | 146 | $this->creationDate = $creationDate; |
| 154 | 147 | } |
| 155 | 148 | |
@@ -164,16 +157,14 @@ discard block |
||
| 164 | 157 | /** |
| 165 | 158 | * @param \DateTime $updateDate |
| 166 | 159 | */ |
| 167 | - public function setUpdateDate(\DateTime $updateDate) |
|
| 168 | - { |
|
| 160 | + public function setUpdateDate(\DateTime $updateDate) { |
|
| 169 | 161 | $this->updateDate = $updateDate; |
| 170 | 162 | } |
| 171 | 163 | |
| 172 | 164 | /** |
| 173 | 165 | * @return ArrayCollection |
| 174 | 166 | */ |
| 175 | - public function getUsers() |
|
| 176 | - { |
|
| 167 | + public function getUsers() { |
|
| 177 | 168 | return $this->users; |
| 178 | 169 | } |
| 179 | 170 | |
@@ -181,8 +172,7 @@ discard block |
||
| 181 | 172 | * @param User $user |
| 182 | 173 | * @return $this |
| 183 | 174 | */ |
| 184 | - public function addUser(User $user) |
|
| 185 | - { |
|
| 175 | + public function addUser(User $user) { |
|
| 186 | 176 | $this->users[] = $user; |
| 187 | 177 | |
| 188 | 178 | return $this; |
@@ -191,8 +181,7 @@ discard block |
||
| 191 | 181 | /** |
| 192 | 182 | * @param User $user |
| 193 | 183 | */ |
| 194 | - public function removeUSer(User $user) |
|
| 195 | - { |
|
| 184 | + public function removeUSer(User $user) { |
|
| 196 | 185 | $this->users->removeElement($user); |
| 197 | 186 | } |
| 198 | 187 | } |
| 199 | 188 | \ No newline at end of file |