ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\LearningModule\Question\Usage\TableBuilder Class Reference
+ Inheritance diagram for ILIAS\LearningModule\Question\Usage\TableBuilder:
+ Collaboration diagram for ILIAS\LearningModule\Question\Usage\TableBuilder:

Public Member Functions

 __construct (object $parent_gui, string $parent_cmd, protected int $obj_id)
 
- Public Member Functions inherited from ILIAS\Repository\Table\CommonTableBuilder
 __construct (protected object $parent_gui, protected string $parent_cmd, bool $numeric_ids=true)
 
 getTable ()
 

Protected Member Functions

 getId ()
 
 getTitle ()
 
 getRetrieval ()
 
 transformRow (array $data_row)
 transform raw data array to table row data array More...
 
 build (TableAdapterGUI $table)
 
- Protected Member Functions inherited from ILIAS\Repository\Table\CommonTableBuilder
 getId ()
 
 getTitle ()
 
 getRetrieval ()
 
 getNamespace ()
 
 getOrderingCommand ()
 
 activeAction (string $action, array $data_row)
 
 transformRow (array $data_row)
 transform raw data array to table row data array More...
 
 build (TableAdapterGUI $table)
 

Protected Attributes

ilCtrl $ctrl
 
QuestionInfo $question_info
 
ilLanguage $lng
 
UIFactory $ui_factory
 
- Protected Attributes inherited from ILIAS\Repository\Table\CommonTableBuilder
TableAdapterGUI $table
 

Detailed Description

Definition at line 31 of file TableBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LearningModule\Question\Usage\TableBuilder::__construct ( object  $parent_gui,
string  $parent_cmd,
protected int  $obj_id 
)

Definition at line 38 of file TableBuilder.php.

42 {
43 global $DIC;
44
45 $this->ctrl = $DIC->ctrl();
46 $this->question_info = $DIC->testQuestion();
47 $this->lng = $DIC->language();
48 $this->ui_factory = $DIC->ui()->factory();
49
50 $this->lng->loadLanguageModule('cont');
51
52 parent::__construct($parent_gui, $parent_cmd, true);
53 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ build()

ILIAS\LearningModule\Question\Usage\TableBuilder::build ( TableAdapterGUI  $table)
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 87 of file TableBuilder.php.

87 : TableAdapterGUI
88 {
89 return $table
90 ->textColumn('title', $this->lng->txt('cont_question'))
91 ->linkColumn('page', $this->lng->txt('cont_page_usage'));
92 }
textColumn(string $key, string $title, bool $sortable=false)

References ILIAS\Repository\Table\CommonTableBuilder\$table, ILIAS\Repository\lng(), and ILIAS\Repository\Table\TableAdapterGUI\textColumn().

+ Here is the call graph for this function:

◆ getId()

ILIAS\LearningModule\Question\Usage\TableBuilder::getId ( )
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 55 of file TableBuilder.php.

55 : string
56 {
57 return 'question_usage';
58 }

◆ getRetrieval()

ILIAS\LearningModule\Question\Usage\TableBuilder::getRetrieval ( )
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 65 of file TableBuilder.php.

65 : RetrievalInterface
66 {
67 return new Retrieval(
68 $this->obj_id,
69 $this->ctrl,
70 $this->question_info
71 );
72 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getTitle()

ILIAS\LearningModule\Question\Usage\TableBuilder::getTitle ( )
protected

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 60 of file TableBuilder.php.

60 : string
61 {
62 return $this->lng->txt('cont_question_page_usage');
63 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ transformRow()

ILIAS\LearningModule\Question\Usage\TableBuilder::transformRow ( array  $data_row)
protected

transform raw data array to table row data array

Reimplemented from ILIAS\Repository\Table\CommonTableBuilder.

Definition at line 74 of file TableBuilder.php.

74 : array
75 {
76 $data = [
77 'id' => $data_row['id'],
78 'title' => $data_row['title'] ?? '',
79 'page' => $this->ui_factory->link()->standard(
80 $data_row['page_title'] ?? '',
81 $data_row['page_link'] ?? ''
82 )
83 ];
84 return $data;
85 }

References $data.

Field Documentation

◆ $ctrl

ilCtrl ILIAS\LearningModule\Question\Usage\TableBuilder::$ctrl
protected

Definition at line 33 of file TableBuilder.php.

◆ $lng

ilLanguage ILIAS\LearningModule\Question\Usage\TableBuilder::$lng
protected

Definition at line 35 of file TableBuilder.php.

◆ $question_info

QuestionInfo ILIAS\LearningModule\Question\Usage\TableBuilder::$question_info
protected

Definition at line 34 of file TableBuilder.php.

◆ $ui_factory

UIFactory ILIAS\LearningModule\Question\Usage\TableBuilder::$ui_factory
protected

Definition at line 36 of file TableBuilder.php.


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