allow nulls

This commit is contained in:
fogelito
2026-01-22 17:23:46 +02:00
parent c5b415af59
commit 1daef72ca9
@@ -12,21 +12,16 @@ class Projects extends Base
];
/**
* Expression constructor
*
* @param array|null $allowedAttributes
* @throws \Exception
*/
public function __construct()
public function __construct(array $allowedAttributes = null)
{
parent::__construct('projects', $this->getAllowedAttributes());
parent::__construct('projects', $allowedAttributes ?? static::ALLOWED_ATTRIBUTES);
}
public function isSelectQueryAllowed(): bool
{
return true;
}
public function getAllowedAttributes(): array
{
return self::ALLOWED_ATTRIBUTES;
}
}