ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\Implementation\Component Namespace Reference

Namespaces

 Breadcrumbs
 
 Button
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
 Card
 
 Chart
 
 Counter
 
 Deck
 
 Divider
 
 Dropdown
 
 Dropzone
 
 Entity
 
 Image
 
 Input
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
 Item
 
 Launcher
 
 Layout
 
 Legacy
 
 
 Listing
 
 MainControls
 
 Menu
 
 MessageBox
 
 Modal
 
 Panel
 
 Player
 
 Popover
 
 Progress
 
 Prompt
 
 Symbol
 
 Table
 
 Toast
 
 Tree
 
 ViewControl
 

Data Structures

class  ReplaceContentSignal
 Class ReplaceContentSignal. More...
 
class  ReplaceSignal
 Replace Signal. More...
 
class  Signal
 
class  SignalGenerator
 
interface  SignalGeneratorInterface
 
class  TriggeredSignal
 

Functions

 withContentLanguage (LanguageTag $content_language)
 
 getContentLanguage ()
 
 withHelpTopics (Topic ... $topics)
 
 withAdditionalHelpTopics (Topic ... $topics)
 
 getHelpTopics ()
 
 withOnLoadCode (Closure $binder)
 
 withAdditionalOnLoadCode (Closure $binder)
 
 getOnLoadCode ()
 
 checkBinder (Closure $binder)
 
 appendTriggeredSignal (C\Signal $signal, string $event)
 Append a triggered signal to other signals of the same event. More...
 
 withTriggeredSignal (C\Signal $signal, string $event)
 Add a triggered signal, replacing any other signals registered on the same event. More...
 
 setTriggeredSignal (C\Signal $signal, string $event)
 Add a triggered signal, replacing any other signals registered on the same event. More...
 
 getTriggeredSignals ()
 
 getTriggeredSignalsFor (string $event)
 Get signals that are triggered for a certain event. More...
 
 withResetTriggeredSignals ()
 
 flattenArray (array $array)
 Flatten a multidimensional array to a single dimension. More...
 

Variables

trait HasContentLanguage
 
trait HasHelpTopics
 
trait JavaScriptBindable
 Trait for components implementing JavaScriptBindable providing standard implementation. More...
 
trait Triggerer
 

Function Documentation

◆ appendTriggeredSignal()

ILIAS\UI\Implementation\Component\appendTriggeredSignal ( C\Signal  $signal,
string  $event 
)
protected

Append a triggered signal to other signals of the same event.

Returns
static

Definition at line 47 of file Triggerer.php.

Referenced by Triggerermock\_appendTriggeredSignal(), ILIAS\UI\Implementation\Component\Input\Field\Checkbox\appendOnChange(), ILIAS\UI\Implementation\Component\Button\Minimize\appendOnClick(), ILIAS\UI\Implementation\Component\Button\Close\appendOnClick(), ILIAS\UI\Implementation\Component\Input\Container\Filter\ProxyFilterField\appendOnClick(), ILIAS\UI\Implementation\Component\Dropdown\Dropdown\appendOnClick(), ILIAS\UI\Implementation\Component\Tree\Node\Node\appendOnClick(), ILIAS\UI\Implementation\Component\Button\Button\appendOnClick(), ILIAS\UI\Implementation\Component\Image\Image\appendOnClick(), ILIAS\UI\Implementation\Component\Symbol\Glyph\Glyph\appendOnClick(), ILIAS\UI\Implementation\Component\Card\Card\appendOnClick(), ILIAS\UI\Implementation\Component\Dropdown\Dropdown\appendOnHover(), ILIAS\UI\Implementation\Component\Button\Button\appendOnHover(), ILIAS\UI\Implementation\Component\MainControls\Slate\Slate\appendOnInView(), ILIAS\UI\Implementation\Component\Input\Field\Checkbox\appendOnLoad(), ILIAS\UI\Implementation\Component\Modal\Modal\appendOnLoad(), ILIAS\UI\Implementation\Component\Input\Field\FormInput\appendOnUpdate(), ILIAS\UI\Implementation\Component\Dropzone\File\File\withAdditionalDrop(), ILIAS\UI\Implementation\Component\Input\Field\Tag\withAdditionalOnTagAdded(), ILIAS\UI\Implementation\Component\Input\Field\Tag\withAdditionalOnTagRemoved(), ILIAS\UI\Implementation\Component\Button\Toggle\withAdditionalToggleOffSignal(), and ILIAS\UI\Implementation\Component\Button\Toggle\withAdditionalToggleOnSignal().

48  {
49  $clone = clone $this;
50  if (!isset($clone->triggered_signals[$event])) {
51  $clone->triggered_signals[$event] = array();
52  }
53  $clone->triggered_signals[$event][] = new TriggeredSignal($signal, $event);
54  return $clone;
55  }
+ Here is the caller graph for this function:

◆ checkBinder()

ILIAS\UI\Implementation\Component\checkBinder ( Closure  $binder)
private
Exceptions

Definition at line 71 of file JavaScriptBindable.php.

Referenced by ILIAS\UI\Implementation\Component\withAdditionalOnLoadCode(), and ILIAS\UI\Implementation\Component\withOnLoadCode().

71  : void
72  {
73  $refl = new ReflectionFunction($binder);
74  $args = array_map(fn ($arg) => $arg->name, $refl->getParameters());
75  if (array("id") !== $args) {
76  throw new InvalidArgumentException('Expected closure "$binder" to have exactly one argument "$id".');
77  }
78  }
+ Here is the caller graph for this function:

◆ flattenArray()

ILIAS\UI\Implementation\Component\flattenArray ( array  $array)
private

Flatten a multidimensional array to a single dimension.

Definition at line 115 of file Triggerer.php.

References Vendor\Package\$a.

Referenced by ILIAS\UI\Implementation\Component\getTriggeredSignals().

115  : array
116  {
117  $flatten = array();
118  array_walk_recursive($array, function ($a) use (&$flatten) {
119  $flatten[] = $a;
120  });
121  return $flatten;
122  }
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
+ Here is the caller graph for this function:

◆ getContentLanguage()

ILIAS\UI\Implementation\Component\getContentLanguage ( )

Definition at line 36 of file HasContentLanguage.php.

36  : ?LanguageTag
37  {
38  return $this->content_language;
39  }

◆ getHelpTopics()

ILIAS\UI\Implementation\Component\getHelpTopics ( )
See also
ILIASgetHelpTopics

Definition at line 55 of file HasHelpTopics.php.

55  : array
56  {
57  return $this->help_topics;
58  }

◆ getOnLoadCode()

ILIAS\UI\Implementation\Component\getOnLoadCode ( )
See also
getOnLoadCode

Definition at line 63 of file JavaScriptBindable.php.

Referenced by ILIAS\UI\Implementation\Component\Input\Container\Form\FormAdapterGUI\initJavascript(), and ILIAS\UI\Implementation\Component\withAdditionalOnLoadCode().

63  : ?Closure
64  {
65  return $this->on_load_code_binder;
66  }
+ Here is the caller graph for this function:

◆ getTriggeredSignals()

ILIAS\UI\Implementation\Component\getTriggeredSignals ( )
Returns
TriggeredSignal[]

Definition at line 84 of file Triggerer.php.

References ILIAS\UI\Implementation\Component\flattenArray().

84  : array
85  {
86  return $this->flattenArray($this->triggered_signals);
87  }
flattenArray(array $array)
Flatten a multidimensional array to a single dimension.
Definition: Triggerer.php:115
+ Here is the call graph for this function:

◆ getTriggeredSignalsFor()

ILIAS\UI\Implementation\Component\getTriggeredSignalsFor ( string  $event)

Get signals that are triggered for a certain event.

Returns
C[]

Definition at line 94 of file Triggerer.php.

Referenced by ILIAS\UI\Implementation\Component\Button\Button\getAction(), ILIAS\UI\Implementation\Component\Image\Image\getAction(), ILIAS\UI\Implementation\Component\Button\Toggle\getActionOff(), ILIAS\UI\Implementation\Component\Button\Toggle\getActionOn(), and ILIAS\UI\Implementation\Component\Card\Card\getTitleAction().

94  : array
95  {
96  if (!isset($this->triggered_signals[$event])) {
97  return [];
98  }
99  return array_map(
100  fn ($ts) => $ts->getSignal(),
101  $this->triggered_signals[$event]
102  );
103  }
+ Here is the caller graph for this function:

◆ setTriggeredSignal()

ILIAS\UI\Implementation\Component\setTriggeredSignal ( C\Signal  $signal,
string  $event 
)
protected

Add a triggered signal, replacing any other signals registered on the same event.

ATTENTION: This mutates the original object and should only be used when there is no other possibility.

Definition at line 75 of file Triggerer.php.

Referenced by ILIAS\UI\Implementation\Component\Button\Toggle\__construct(), ILIAS\UI\Implementation\Component\Button\Button\__construct(), and Triggerermock\_setTriggeredSignal().

75  : void
76  {
77  $this->triggered_signals[$event] = array();
78  $this->triggered_signals[$event][] = new TriggeredSignal($signal, $event);
79  }
+ Here is the caller graph for this function:

◆ withAdditionalHelpTopics()

ILIAS\UI\Implementation\Component\withAdditionalHelpTopics ( Topic ...  $topics)
See also
ILIASwithAdditionalHelpTopics

Definition at line 44 of file HasHelpTopics.php.

References ILIAS\UI\examples\Symbol\Glyph\Sort\sort().

44  : static
45  {
46  $clone = clone $this;
47  $clone->help_topics = array_unique(array_merge($this->help_topics, $topics), SORT_REGULAR);
48  sort($clone->help_topics);
49  return $clone;
50  }
sort()
description: > Example for rendering a Sort Glyph.
Definition: sort.php:41
+ Here is the call graph for this function:

◆ withAdditionalOnLoadCode()

ILIAS\UI\Implementation\Component\withAdditionalOnLoadCode ( Closure  $binder)
See also
withAdditionalOnLoadCode

Definition at line 49 of file JavaScriptBindable.php.

References $id, ILIAS\UI\Implementation\Component\checkBinder(), ILIAS\UI\Implementation\Component\getOnLoadCode(), null, and ILIAS\UI\Implementation\Component\withOnLoadCode().

Referenced by ilPersonalProfileGUI\addEmailChangeModal(), ilMyStaffGUI\addLinkWithActionData(), ilTestNavigationToolbarGUI\addPassOverviewButton(), ilTestNavigationToolbarGUI\addSuspendTestButton(), ilDclRecordListTableGUI\buildData(), ilObjForumGUI\doHistoryCheck(), ILIAS\OnScreenChat\Provider\OnScreenChatProvider\getAsyncItem(), ILIAS\Object\Properties\MultiObjectPropertiesManipulator\getAvailabilityPeriodButton(), ILIAS\Notes\Export\ExportHelperGUI\getCommentIncludeModalDialog(), ilQuestionBrowserTableGUI\getCommentsHtml(), ILIAS\Search\Provider\SearchMetaBarProvider\getMetaBarItems(), ilDclBaseRecordModel\getStandardFieldHTML(), ilNoteGUI\getTriggerShyButton(), ilObjDashboardSettingsGUI\getViewSectionSorting(), ILIAS\Test\Settings\MainSettings\SettingsMainGUI\populateConfirmationModal(), assClozeTestGUI\populateQuestionSpecificFormPart(), ILIAS\BookingManager\BookingProcess\ObjectSelectionListGUI\render(), ilTermDefinitionBulkCreationGUI\renderConfirmation(), ilBookBulkCreationGUI\renderConfirmation(), and assFormulaQuestionGUI\resetSavedPreviewSession().

50  {
51  $current_binder = $this->getOnLoadCode();
52  if ($current_binder === null) {
53  return $this->withOnLoadCode($binder);
54  }
55 
56  $this->checkBinder($binder);
57  return $this->withOnLoadCode(fn ($id) => $current_binder($id) . "\n" . $binder($id));
58  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withContentLanguage()

ILIAS\UI\Implementation\Component\withContentLanguage ( LanguageTag  $content_language)

Definition at line 29 of file HasContentLanguage.php.

29  : self
30  {
31  $clone = clone $this;
32  $clone->content_language = $content_language;
33  return $clone;
34  }

◆ withHelpTopics()

ILIAS\UI\Implementation\Component\withHelpTopics ( Topic ...  $topics)
See also
ILIASwithHelpTopics

Definition at line 33 of file HasHelpTopics.php.

References ILIAS\UI\examples\Symbol\Glyph\Sort\sort().

33  : static
34  {
35  $clone = clone $this;
36  $clone->help_topics = array_unique($topics, SORT_REGULAR);
37  sort($clone->help_topics);
38  return $clone;
39  }
sort()
description: > Example for rendering a Sort Glyph.
Definition: sort.php:41
+ Here is the call graph for this function:

◆ withOnLoadCode()

ILIAS\UI\Implementation\Component\withOnLoadCode ( Closure  $binder)
See also
withOnLoadCode

Definition at line 38 of file JavaScriptBindable.php.

References ILIAS\UI\Implementation\Component\checkBinder().

Referenced by ilObjForumGUI\addActivationFormModal(), ILIAS\Test\Questions\Presentation\Printer\addPrintButtonToToolbar(), ilTestEvaluationGUI\addPrintButtonToToolbar(), ilTestEvaluationGUI\addPrintResultsButtonToToolbar(), ilTestPlayerAbstractGUI\buildPreviousButtonInstance(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilGroupAddToGroupActionGUI\confirmCreateGroupAndAddUser(), ilMailFolderGUI\confirmDeleteMails(), ILIAS\Repository\Modal\ModalAdapterGUI\form(), ilObjStudyProgrammeAutoCategoriesGUI\getAsyncModalOutput(), ILIAS\MetaData\Vocabularies\Dispatch\Presentation\Presentation\VideoViewGUI\getDropdown(), ilExerciseManagementGUI\getEvaluationModal(), ilPersonalSkillsGUI\getLatestEntriesForSkillHTML(), ilObjLinkResourceGUI\getLinkToListModal(), ilPersonalSkillsGUI\getNonLatestEntriesForSkillHTML(), ILIAS\COPage\Editor\Server\UIWrapper\getRenderedModalFailureBox(), ilInternalLinkGUI\getUserSearchResult(), ilCalendarBlockGUI\getViewControl(), ilObjForumGUI\initHeaderAction(), ilExerciseSubmissionTableGUI\parseColumns(), ilForumNotificationTableGUI\populateWithModal(), ilNewsTimelineItemGUI\render(), ILIAS\UI\Implementation\Component\Input\Container\Filter\Renderer\renderApplyAndReset(), ilTaggingSlateContentGUI\renderResourcesForTag(), ILIAS\MetaData\Vocabularies\Dispatch\Presentation\Presentation\VideoViewGUI\renderSideColumn(), ilObjForumGUI\renderSplitButton(), ilExerciseManagementGUI\saveGradesObject(), ilHelpGUI\search(), ilGroupAddToGroupActionGUI\sendResponse(), ilGroupAddToGroupActionGUI\show(), ilMailFormGUI\showForm(), ilHelpGUI\showPage(), ilObjectCopyGUI\showTargetSelectionTree(), ilTestEvalObjectiveOrientedGUI\showVirtualPassCmd(), and ILIAS\UI\Implementation\Component\withAdditionalOnLoadCode().

39  {
40  $this->checkBinder($binder);
41  $clone = clone $this;
42  $clone->on_load_code_binder = $binder;
43  return $clone;
44  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withResetTriggeredSignals()

ILIAS\UI\Implementation\Component\withResetTriggeredSignals ( )

Definition at line 105 of file Triggerer.php.

105  : C\Triggerer
106  {
107  $clone = clone $this;
108  $clone->triggered_signals = array();
109  return $clone;
110  }

◆ withTriggeredSignal()

ILIAS\UI\Implementation\Component\withTriggeredSignal ( C\Signal  $signal,
string  $event 
)
protected

Add a triggered signal, replacing any other signals registered on the same event.

Returns
static

Definition at line 62 of file Triggerer.php.

Referenced by Triggerermock\_withTriggeredSignal(), ILIAS\UI\Implementation\Component\Modal\Modal\appendOnClose(), ILIAS\UI\Implementation\Component\Input\Field\Checkbox\withOnChange(), ILIAS\UI\Implementation\Component\Button\Minimize\withOnClick(), ILIAS\UI\Implementation\Component\Button\Close\withOnClick(), ILIAS\UI\Implementation\Component\Input\Container\Filter\ProxyFilterField\withOnClick(), ILIAS\UI\Implementation\Component\Dropdown\Dropdown\withOnClick(), ILIAS\UI\Implementation\Component\Tree\Node\Node\withOnClick(), ILIAS\UI\Implementation\Component\Button\Button\withOnClick(), ILIAS\UI\Implementation\Component\Image\Image\withOnClick(), ILIAS\UI\Implementation\Component\Symbol\Glyph\Glyph\withOnClick(), ILIAS\UI\Implementation\Component\Card\Card\withOnClick(), ILIAS\UI\Implementation\Component\Modal\Modal\withOnClose(), ILIAS\UI\Implementation\Component\Dropzone\File\File\withOnDrop(), ILIAS\UI\Implementation\Component\Dropdown\Dropdown\withOnHover(), ILIAS\UI\Implementation\Component\Button\Button\withOnHover(), ILIAS\UI\Implementation\Component\Modal\Modal\withOnLoad(), ILIAS\UI\Implementation\Component\Input\Field\Checkbox\withOnLoad(), ILIAS\UI\Implementation\Component\ViewControl\Pagination\withOnSelect(), ILIAS\UI\Implementation\Component\ViewControl\Sortation\withOnSort(), and ILIAS\UI\Implementation\Component\Input\Field\FormInput\withOnUpdate().

63  {
64  $clone = clone $this;
65  $clone->setTriggeredSignal($signal, $event);
66  return $clone;
67  }
+ Here is the caller graph for this function:

Variable Documentation

◆ HasContentLanguage

trait ILIAS::UI::Implementation::Component\HasContentLanguage
Initial value:
{
protected ?LanguageTag $content_language = null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

Definition at line 26 of file HasContentLanguage.php.

◆ HasHelpTopics

trait ILIAS::UI::Implementation::Component\HasHelpTopics
Initial value:
{
protected array $help_topics = []

Definition at line 26 of file HasHelpTopics.php.

Referenced by HasHelpTopicsTest\setUp().

◆ JavaScriptBindable

trait ILIAS::UI::Implementation::Component\JavaScriptBindable
Initial value:
{
private ?Closure $on_load_code_binder = null
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

Trait for components implementing JavaScriptBindable providing standard implementation.

Definition at line 32 of file JavaScriptBindable.php.

◆ Triggerer

trait ILIAS::UI::Implementation::Component\Triggerer
Initial value:
{
private array $triggered_signals = array()

Definition at line 36 of file Triggerer.php.