ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\UI\Implementation\Component\Signal Class Reference
+ Inheritance diagram for ILIAS\UI\Implementation\Component\Signal:
+ Collaboration diagram for ILIAS\UI\Implementation\Component\Signal:

Public Member Functions

 __construct (string $id)
 
 getId ()
 Get the ID of this signal. More...
 
 withOptions (array $options)
 Get a Signal like this, but provide it with a set of options. More...
 
 getOptions ()
 Get the options of this signal. More...
 
 addOption (string $key, $value)
 
 __toString ()
 
 getId ()
 Get the ID of this signal. More...
 
 withOptions (array $options)
 Get a Signal like this, but provide it with a set of options. More...
 
 getOptions ()
 Get the options of this signal. More...
 

Protected Member Functions

 getOption (string $key)
 

Protected Attributes

string $id
 
array $options = array()
 

Detailed Description

Definition at line 29 of file Signal.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\UI\Implementation\Component\Signal::__construct ( string  $id)

Definition at line 34 of file Signal.php.

35 {
36 $this->id = $id;
37 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id.

Member Function Documentation

◆ __toString()

ILIAS\UI\Implementation\Component\Signal::__toString ( )

Definition at line 77 of file Signal.php.

77 : string
78 {
79 return $this->id;
80 }

References $id.

◆ addOption()

ILIAS\UI\Implementation\Component\Signal::addOption ( string  $key,
  $value 
)
Parameters
mixed$value

Definition at line 64 of file Signal.php.

64 : void
65 {
66 $this->options[$key] = $value;
67 }

◆ getId()

ILIAS\UI\Implementation\Component\Signal::getId ( )

Get the ID of this signal.

Implements ILIAS\UI\Component\Signal.

Definition at line 42 of file Signal.php.

42 : string
43 {
44 return $this->id;
45 }

References $id.

◆ getOption()

ILIAS\UI\Implementation\Component\Signal::getOption ( string  $key)
protected
Returns
mixed|null

Definition at line 72 of file Signal.php.

73 {
74 return (isset($this->options[$key])) ? $this->options[$key] : null;
75 }

◆ getOptions()

ILIAS\UI\Implementation\Component\Signal::getOptions ( )

Get the options of this signal.

Returns
array<string, string> (key => value)

Implements ILIAS\UI\Component\Signal.

Definition at line 56 of file Signal.php.

56 : array
57 {
58 return $this->options;
59 }

References ILIAS\UI\Implementation\Component\Input\Field\$options.

◆ withOptions()

ILIAS\UI\Implementation\Component\Signal::withOptions ( array  $options)

Get a Signal like this, but provide it with a set of options.

Parameters
array<string,string>$options (key => value)

Implements ILIAS\UI\Component\Signal.

Definition at line 47 of file Signal.php.

47 : static
48 {
49 $clone = clone $this;
50 foreach ($options as $key => $value) {
51 $clone->addOption($key, $value);
52 }
53 return $clone;
54 }

References ILIAS\UI\Implementation\Component\Input\Field\$options.

Field Documentation

◆ $id

string ILIAS\UI\Implementation\Component\Signal::$id
protected

Definition at line 31 of file Signal.php.

◆ $options

array ILIAS\UI\Implementation\Component\Signal::$options = array()
protected

Definition at line 32 of file Signal.php.


The documentation for this class was generated from the following file: