Skip to content

Commit

Permalink
Repository/PluginSlot: Add ability to use next_class in the derived c…
Browse files Browse the repository at this point in the history
…lass
  • Loading branch information
shecken committed Sep 24, 2024
1 parent 2d0ef50 commit b7756ed
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,17 @@ public function executeCommand(): void
);
}

$next_class = $ilCtrl->getNextClass();
if($next_class && $this->performNextClass($next_class)) {
return;
}
$this->performCommand($ilCtrl->getCmd("configure"));
}

abstract public function performCommand(string $cmd): void;

protected function performNextClass(string $next_class): bool
{
return false;
}
}
10 changes: 10 additions & 0 deletions components/ILIAS/Repository/PluginSlot/class.ilObjectPluginGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ public function executeCommand(): void
$this->ctrl->forwardCommand($gui);
break;
default:
if($next_class && $this->performNextClass($next_class))
{
break;
}

if ($cmd === "save" || $this->getCreationMode()) {
$this->$cmd();
return;
Expand Down Expand Up @@ -464,4 +469,9 @@ protected function lookupParentTitleInCreationMode(): string
$this->slot_request->getRefId()
));
}

protected function performNextClass(string $next_class): bool
{
return false;
}
}

0 comments on commit b7756ed

Please sign in to comment.