ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\Blog\Contributor\ContributorTableBuilder Class Reference
+ Inheritance diagram for ILIAS\Blog\Contributor\ContributorTableBuilder:
+ Collaboration diagram for ILIAS\Blog\Contributor\ContributorTableBuilder:

Public Member Functions

 __construct (protected InternalDomainService $domain, protected InternalGUIService $gui, protected array $roles, object $parent_gui, string $parent_cmd)
 
- 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)
 
 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

array $local_roles = []
 
array $contributor_ids = []
 
- Protected Attributes inherited from ILIAS\Repository\Table\CommonTableBuilder
TableAdapterGUI $table
 

Detailed Description

Definition at line 29 of file ContributorTableBuilder.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Blog\Contributor\ContributorTableBuilder::__construct ( protected InternalDomainService  $domain,
protected InternalGUIService  $gui,
protected array  $roles,
object  $parent_gui,
string  $parent_cmd 
)

Definition at line 34 of file ContributorTableBuilder.php.

References ILIAS\GlobalScreen\Provider\__construct().

40  {
41  $this->local_roles = $roles;
42  parent::__construct($parent_gui, $parent_cmd);
43  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ build()

ILIAS\Blog\Contributor\ContributorTableBuilder::build ( TableAdapterGUI  $table)
protected

Definition at line 76 of file ContributorTableBuilder.php.

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

76  : TableAdapterGUI
77  {
78  $lng = $this->domain->lng();
79 
80  $table = $table
81  ->textColumn("name", $lng->txt("name"), true)
82  ->textColumn("role", $lng->txt("obj_role"));
83 
84  if ($this->contributor_ids) {
86  "addContributorContainerAction",
87  $lng->txt("add")
88  );
89  } else {
91  "confirmRemoveContributor",
92  $lng->txt("remove")
93  );
94  }
95 
96  return $table;
97  }
textColumn(string $key, string $title, bool $sortable=false)
multiAction(string $action, string $title)
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

◆ getId()

ILIAS\Blog\Contributor\ContributorTableBuilder::getId ( )
protected

Definition at line 45 of file ContributorTableBuilder.php.

45  : string
46  {
47  return "contributor";
48  }

◆ getRetrieval()

ILIAS\Blog\Contributor\ContributorTableBuilder::getRetrieval ( )
protected

Definition at line 59 of file ContributorTableBuilder.php.

References ILIAS\Blog\Contributor\ContributorTableBuilder\$local_roles.

60  {
61  return new ContributorRetrieval(
62  $this->domain->rbac()->review(),
64  );
65  }

◆ getTitle()

ILIAS\Blog\Contributor\ContributorTableBuilder::getTitle ( )
protected

Definition at line 50 of file ContributorTableBuilder.php.

50  : string
51  {
52  if ($this->contributor_ids) {
53  return $this->domain->lng()->txt("blog_contributor_container_add");
54  } else {
55  return $this->domain->lng()->txt("blog_contributors");
56  }
57  }

◆ transformRow()

ILIAS\Blog\Contributor\ContributorTableBuilder::transformRow ( array  $data_row)
protected

Definition at line 67 of file ContributorTableBuilder.php.

67  : array
68  {
69  return [
70  "id" => $data_row["id"],
71  "name" => $data_row["name"],
72  "role" => implode(", ", $data_row["role"])
73  ];
74  }

Field Documentation

◆ $contributor_ids

array ILIAS\Blog\Contributor\ContributorTableBuilder::$contributor_ids = []
protected

Definition at line 32 of file ContributorTableBuilder.php.

◆ $local_roles

array ILIAS\Blog\Contributor\ContributorTableBuilder::$local_roles = []
protected

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