ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\LegalDocuments\SmoothTableConfig Class Reference

This class takes care of the order in which the methods must be called. More...

+ Inheritance diagram for ILIAS\LegalDocuments\SmoothTableConfig:
+ Collaboration diagram for ILIAS\LegalDocuments\SmoothTableConfig:

Public Member Functions

 __construct (private readonly ilTable2GUI $target)
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setExternalSorting (bool $a_val)
 
 setDefaultOrderField (string $a_defaultorderfield)
 
 setDefaultOrderDirection (string $a_defaultorderdirection)
 
 setSelectableColumns (string ... $names)
 
 addMultiCommand (string $a_cmd, string $a_text)
 
 addCommandButton (string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
 asFilter (string $reset_command)
 
 flush ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setExternalSorting (bool $a_val)
 
 setDefaultOrderField (string $a_defaultorderfield)
 
 setDefaultOrderDirection (string $a_defaultorderdirection)
 
 setSelectableColumns (string ... $names)
 
 addMultiCommand (string $a_cmd, string $a_text)
 
 addCommandButton (string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
 asFilter (string $reset_command)
 

Private Attributes

array $later = []
 

Detailed Description

This class takes care of the order in which the methods must be called.

Definition at line 29 of file SmoothTableConfig.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\SmoothTableConfig::__construct ( private readonly ilTable2GUI  $target)

Definition at line 34 of file SmoothTableConfig.php.

35 {
36 }

Member Function Documentation

◆ addCommandButton()

ILIAS\LegalDocuments\SmoothTableConfig::addCommandButton ( string  $a_cmd,
string  $a_text,
string  $a_onclick = '',
string  $a_id = "",
string  $a_class = "" 
)

Implements ILIAS\LegalDocuments\TableConfig.

Definition at line 71 of file SmoothTableConfig.php.

77 : void {
78 $args = func_get_args();
79 $this->later[] = fn() => $this->target->addCommandButton(...$args);
80 }

◆ addMultiCommand()

ILIAS\LegalDocuments\SmoothTableConfig::addMultiCommand ( string  $a_cmd,
string  $a_text 
)

Implements ILIAS\LegalDocuments\TableConfig.

Definition at line 66 of file SmoothTableConfig.php.

66 : void
67 {
68 $this->later[] = fn() => $this->target->addMultiCommand($a_cmd, $a_text);
69 }

◆ asFilter()

ILIAS\LegalDocuments\SmoothTableConfig::asFilter ( string  $reset_command)

Implements ILIAS\LegalDocuments\TableConfig.

Definition at line 82 of file SmoothTableConfig.php.

82 : TableFilter
83 {
84 $filter = new SmoothTableFilter($this->target, $reset_command);
85 $this->later[] = $filter->flush(...);
86 return $filter;
87 }

◆ flush()

ILIAS\LegalDocuments\SmoothTableConfig::flush ( )

Definition at line 89 of file SmoothTableConfig.php.

89 : void
90 {
91 array_map(fn($proc) => $proc(), $this->later);
92 $this->later = [];
93 }

◆ setDefaultOrderDirection()

ILIAS\LegalDocuments\SmoothTableConfig::setDefaultOrderDirection ( string  $a_defaultorderdirection)

Implements ILIAS\LegalDocuments\TableConfig.

Definition at line 56 of file SmoothTableConfig.php.

56 : void
57 {
58 $this->target->setDefaultOrderDirection($a_defaultorderdirection);
59 }

◆ setDefaultOrderField()

ILIAS\LegalDocuments\SmoothTableConfig::setDefaultOrderField ( string  $a_defaultorderfield)

Implements ILIAS\LegalDocuments\TableConfig.

Definition at line 51 of file SmoothTableConfig.php.

51 : void
52 {
53 $this->target->setDefaultOrderField($a_defaultorderfield);
54 }

◆ setExternalSorting()

ILIAS\LegalDocuments\SmoothTableConfig::setExternalSorting ( bool  $a_val)

Implements ILIAS\LegalDocuments\TableConfig.

Definition at line 46 of file SmoothTableConfig.php.

46 : void
47 {
48 $this->target->setExternalSorting($a_val);
49 }

◆ setSelectableColumns()

ILIAS\LegalDocuments\SmoothTableConfig::setSelectableColumns ( string ...  $names)

Implements ILIAS\LegalDocuments\TableConfig.

Definition at line 61 of file SmoothTableConfig.php.

61 : void
62 {
63 $this->target->setSelectableColumns(...$names);
64 }

◆ setTitle()

ILIAS\LegalDocuments\SmoothTableConfig::setTitle ( string  $a_title,
string  $a_icon = "",
string  $a_icon_alt = "" 
)

Implements ILIAS\LegalDocuments\TableConfig.

Definition at line 38 of file SmoothTableConfig.php.

42 : void {
43 $this->target->setTitle(...func_get_args());
44 }

Field Documentation

◆ $later

array ILIAS\LegalDocuments\SmoothTableConfig::$later = []
private

Definition at line 32 of file SmoothTableConfig.php.


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