19 declare(strict_types=1);
34 abstract class Slate implements ISlate\Slate
42 public const MENU =
'menu';
81 $this->toggle_signal = $this->signal_generator->create();
82 $this->engage_signal = $this->signal_generator->create();
83 $signal = $this->signal_generator->create(ReplaceSignalImplementation::class);
84 $this->replace_signal = $signal;
124 $clone = clone $this;
125 $clone->engaged = $state;
166 $clone = clone $this;
167 $clone->mainbar_tree_position = $tree_pos;
178 $pos = explode(
':', $this->mainbar_tree_position);
179 return count($pos) - 1;
187 $this->checkArgIsElement(
190 self::$allowed_aria_roles,
191 implode(
'/', self::$allowed_aria_roles)
193 $clone = clone $this;
appendTriggeredSignal(C\Signal $signal, string $event)
Append a triggered signal to other signals of the same event.
__construct(SignalGeneratorInterface $signal_generator, string $name, Symbol $symbol)
getReplaceSignal()
Signal to replace the contents of the slate.
string $mainbar_tree_position
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
getName()
Get the name of this slate.
withMainBarTreePosition(string $tree_pos)
Slates in the main bar need to be addressable via JS, a.o.for storing current activation states or tr...
SignalGeneratorInterface $signal_generator
static array $allowed_aria_roles
getEngaged()
Should the slate be rendered as engaged?
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getSymbol()
Get the Symbol of the slate.
withEngaged(bool $state)
Configures the slate to be rendered as engaged (or not).
initSignals()
Set the signals for this component.
appendOnInView(Signal $signal)
A Signal that is triggered when the slate "comes into view", i.e.is being engaged.
getAriaRole()
Get the ARIA role on the slate.
getEngageSignal()
Signal that engages the slate when triggered.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
withAriaRole(string $aria_role)
Get a slate like this, but with an additional ARIA role.
withMappedSubNodes(callable $f)
getToggleSignal()
Signal that toggles the slate when triggered.