ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
DependantGroup.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2017 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see
4docs/LICENSE */
5
7
8use ILIAS\Data\Factory as DataFactory;
9use ILIAS\Validation\Factory as ValidationFactory;
10use ILIAS\Transformation\Factory as TransformationFactory;
16
21{
30 protected $toggle_signal;
34 protected $show_signal;
38 protected $hide_signal;
42 protected $init_signal;
43
44
54 public function __construct(
55 DataFactory $data_factory,
56 ValidationFactory $validation_factory,
57 TransformationFactory $transformation_factory,
58 SignalGeneratorInterface $signal_generator,
59 $inputs
60 ) {
61 parent::__construct($data_factory, $validation_factory, $transformation_factory, $inputs, "", "");
62 $this->inputs = $inputs;
63 $this->signal_generator = $signal_generator;
64 $this->initSignals();
65 }
66
67
71 public function withResetSignals()
72 {
73 $clone = clone $this;
74 $this->initSignals();
75
76 return $clone;
77 }
78
79
83 protected function initSignals()
84 {
85 $this->toggle_signal = $this->signal_generator->create();
86 $this->show_signal = $this->signal_generator->create();
87 $this->hide_signal = $this->signal_generator->create();
88 $this->init_signal = $this->signal_generator->create();
89 }
90
91
95 public function getToggleSignal()
96 {
97 return $this->toggle_signal;
98 }
99
100
104 public function getShowSignal()
105 {
106 return $this->show_signal;
107 }
108
109
113 public function getHideSignal()
114 {
115 return $this->hide_signal;
116 }
117
118
122 public function getInitSignal()
123 {
124 return $this->init_signal;
125 }
126}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:15
Factory for basic transformations.
Definition: Factory.php:12
initSignals()
Set the signals for the dependant group.
withResetSignals()
Get a component like this but reset (regenerate) its signals.$this
__construct(DataFactory $data_factory, ValidationFactory $validation_factory, TransformationFactory $transformation_factory, SignalGeneratorInterface $signal_generator, $inputs)
DependantGroup constructor.
This describes dependant group inputs.
This describes a group of inputs.
Definition: Group.php:12
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.