WIP: Implement CRUD, improve menu configuration
This commit is contained in:
+2
-2
@@ -26,7 +26,7 @@ class Faq implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
private ?string $answer = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $sorting = null;
|
||||
private int $sorting = 0;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
@@ -57,7 +57,7 @@ class Faq implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSorting(): ?int
|
||||
public function getSorting(): int
|
||||
{
|
||||
return $this->sorting;
|
||||
}
|
||||
|
||||
@@ -94,6 +94,10 @@ class User implements UserInterface, TimestampableEntityInterface
|
||||
{
|
||||
$roles = ['ROLE_USER', ...$this->roles];
|
||||
|
||||
if (in_array('ROLE_ADMIN', $this->roles) || in_array('ROLE_MANAGER', $this->roles)) {
|
||||
$roles[] = 'ROLE_ADMINISTRATIVE';
|
||||
}
|
||||
|
||||
return array_unique($roles);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user