ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
LSTOCBuilder Class Reference

Class LSTOCBuilder. More...

+ Inheritance diagram for LSTOCBuilder:
+ Collaboration diagram for LSTOCBuilder:

Public Member Functions

 __construct ($parent, string $command, string $label='', int $parameter=null, $state=null)
 LSControlBuilder|LSTOCBuilder $parent. More...
 
 toJSON ()
 
 end ()
 Finish building the TOC.
Returns
ControlBuilder|TOCBuilder depending on the nesting level.
More...
 
 node ($label, int $parameter=null, $lp=null)
 Build a sub tree in the TOC.If a parameter is provided, the node in the TOC can be accessed itself.The $parameter can be used to pass additional information to View::updateGet if required, e.g. about a chapter in the content.
Parameters
mixed$stateone of the LP_ constants from TOCBuilder
More...
 
 item (string $label, int $parameter, $state=null)
 Build an entry in the TOC.The parameter will be appended to the command when updating the state.The $parameter can be used to pass additional information to View::updateGet if required, e.g. about a chapter in the content.
Parameters
mixed$stateone of the LP_ constants from TOCBuilder
More...
 

Protected Attributes

 $structure
 
 $parent
 
 $command
 

Additional Inherited Members

- Data Fields inherited from ILIAS\KioskMode\TOCBuilder
const LP_NOT_STARTED = 0
 
const LP_IN_PROGRESS = 1
 
const LP_COMPLETED = 2
 
const LP_FAILED = 3
 

Detailed Description

Class LSTOCBuilder.

Definition at line 11 of file LSTOCBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

LSTOCBuilder::__construct (   $parent,
string  $command,
string  $label = '',
int  $parameter = null,
  $state = null 
)

LSControlBuilder|LSTOCBuilder $parent.

Definition at line 31 of file LSTOCBuilder.php.

References $command, $parent, and $state.

32  {
33  $this->structure = [
34  'label' => $label,
35  'command' => $command,
36  'parameter' => $parameter,
37  'state' => $state,
38  'childs' => []
39  ];
40  $this->parent = $parent;
41  $this->command = $command;
42  }
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10

Member Function Documentation

◆ end()

LSTOCBuilder::end ( )

Finish building the TOC.

Returns
ControlBuilder|TOCBuilder depending on the nesting level.

Implements ILIAS\KioskMode\TOCBuilder.

Definition at line 52 of file LSTOCBuilder.php.

References $parent, and $structure.

53  {
54  $this->parent->structure['childs'][] = $this->structure;
55  return $this->parent;
56  }

◆ item()

LSTOCBuilder::item ( string  $label,
int  $parameter,
  $state = null 
)

Build an entry in the TOC.The parameter will be appended to the command when updating the state.The $parameter can be used to pass additional information to View::updateGet if required, e.g. about a chapter in the content.

Parameters
mixed$stateone of the LP_ constants from TOCBuilder

Implements ILIAS\KioskMode\TOCBuilder.

Definition at line 71 of file LSTOCBuilder.php.

References $command, and $state.

71  : TOCBuilder
72  {
73  $item = [
74  'label' => $label,
75  'command' => $this->command,
76  'parameter' => $parameter,
77  'state' => $state
78  ];
79  $this->structure['childs'][] = $item;
80  return $this;
81  }
Build a nested table of contents for the view.
Definition: TOCBuilder.php:11
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10

◆ node()

LSTOCBuilder::node (   $label,
int  $parameter = null,
  $lp = null 
)

Build a sub tree in the TOC.If a parameter is provided, the node in the TOC can be accessed itself.The $parameter can be used to pass additional information to View::updateGet if required, e.g. about a chapter in the content.

Parameters
mixed$stateone of the LP_ constants from TOCBuilder

Implements ILIAS\KioskMode\TOCBuilder.

Definition at line 61 of file LSTOCBuilder.php.

61  : TOCBuilder
62  {
63  //build node
64  $toc = new LSTOCBuilder($this, $this->command, $label, $parameter, $lp);
65  return $toc;
66  }
Build a nested table of contents for the view.
Definition: TOCBuilder.php:11
Class LSTOCBuilder.

◆ toJSON()

LSTOCBuilder::toJSON ( )

Definition at line 44 of file LSTOCBuilder.php.

44  : string
45  {
46  return json_encode($this->structure);
47  }

Field Documentation

◆ $command

LSTOCBuilder::$command
protected

Definition at line 26 of file LSTOCBuilder.php.

Referenced by __construct(), and item().

◆ $parent

LSTOCBuilder::$parent
protected

Definition at line 21 of file LSTOCBuilder.php.

Referenced by __construct(), and end().

◆ $structure

LSTOCBuilder::$structure
protected

Definition at line 16 of file LSTOCBuilder.php.

Referenced by end().


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