85 $this->signal_generator = $signal_generator;
97 $this->toggle_signal = $this->signal_generator->create();
98 $this->engage_signal = $this->signal_generator->create();
99 $this->replace_signal = $this->signal_generator->create(ReplaceSignalImplementation::class);
139 $clone = clone $this;
140 $clone->engaged = $state;
186 $clone = clone $this;
187 $clone->mainbar_tree_position = $tree_pos;
201 $pos = explode(
':', $this->mainbar_tree_position);
202 return count($pos) - 1;
216 self::$allowed_aria_roles,
217 implode(
'/', self::$allowed_aria_roles)
219 $clone = clone $this;
__construct(SignalGeneratorInterface $signal_generator, string $name, Symbol $symbol)
getReplaceSignal()
Signal to replace the contents of the slate.
checkArgIsElement($which, $value, $array, $name)
Throw an InvalidArgumentException if $value is not an element of array.
Class ChatMainBarProvider .
appendOnFirstView(Signal $signal)
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
trait ComponentHelper
Provides common functionality for component implementations.
getName()
Get the name of this slate.
withMainBarTreePosition(string $tree_pos)
Slates in the mainbar need to be adressable via JS, a.o.for storing current activation states or trig...
getEngaged()
Should the slate be rendered as engaged?
getSymbol()
Get the Symbol of the slate.
static $allowed_aria_roles
withEngaged(bool $state)
Configures the slate to be rendered as engaged (or not).
appendTriggeredSignal(Component\Signal $signal, $event)
Append a triggered signal to other signals of the same event.
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.
This signal replaces a component by ajax.
getEngageSignal()
Signal that engages the slate when triggered.
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.