. */ declare(strict_types=1); namespace App\Entity\LogSystem; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity() */ class UserNotAllowedLogEntry extends AbstractLogEntry { protected string $typeString = 'user_not_allowed'; public function __construct(string $path) { parent::__construct(); $this->level = static::LEVEL_WARNING; $this->extra['a'] = $path; } /** * Returns the path the user tried to accessed and what was denied. */ public function getPath(): string { return $this->extra['a'] ?? 'legacy'; } public function getMessage(): string { return $this->extra['p'] ?? ''; } }