19 declare(strict_types=1);
55 if ((self::PRIORITY_LOW > $priority) || ($priority > self::PRIORITY_HIGH)) {
56 throw new LogicException(
"\$priority MUST be between LayoutModification::PRIORITY_LOW, LayoutModification::PRIORITY_MEDIUM or LayoutModification::PRIORITY_HIGH");
93 $clone->modification = $closure;
114 if (defined(
'DEVMODE') && (
bool) DEVMODE) {
127 if (!$closure instanceof
Closure) {
149 if (
$param->getType()->getName() !== $requested_first_argument_type) {
150 throw new InvalidModification($this,
"Modification's first parameter does not match the requested type");
160 if (!
$r->hasReturnType()) {
164 if (
$r->getReturnType()->getName() !== $requested_return_type) {
165 throw new InvalidModification($this,
"Modification's return type does not match the requested type");
173 throw new InvalidModification($this,
"Modification threw an exception while checking the closure");
getClosureFirstArgumentType()
withModification(Closure $closure)
firstArgumentAllowsNull()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withPriority(int $priority)
Class LayoutModification.