3declare(strict_types=1);
 
   31    protected \ILIAS\DI\Container 
$dic;
 
   33    public function __construct(?
object $a_parent_obj, 
string $a_parent_cmd)
 
   38        $this->
setId(
"ltioconsumer");
 
   44        $this->
setTitle($DIC->language()->txt(
"lti_object_consumer"));
 
   46        $this->
addColumn($DIC->language()->txt(
"active"), 
"active");
 
   47        $this->
addColumn($DIC->language()->txt(
"title"), 
"title");
 
   48        $this->
addColumn($DIC->language()->txt(
"description"), 
"description");
 
   49        $this->
addColumn($DIC->language()->txt(
"prefix"), 
"prefix");
 
   50        $this->
addColumn($DIC->language()->txt(
"in_use"), 
"language");
 
   51        $this->
addColumn($DIC->language()->txt(
"objects"), 
"objects");
 
   52        $this->
addColumn($DIC->language()->txt(
"role"), 
"role");
 
   53        $this->
addColumn($DIC->language()->txt(
"actions"), 
"");
 
   55        $this->
setFormAction($DIC->ctrl()->getFormAction($a_parent_obj));
 
   56        $this->
setRowTemplate(
"tpl.lti_consumer_list_row.html", 
"Services/LTI");
 
   68        $this->editable = $a_status;
 
   88        foreach ($consumer_data as $cons) {
 
   90                "id" => $cons->getExtConsumerId(),
 
   91                "title" => $cons->getTitle(),
 
   92                "description" => $cons->getDescription(),
 
   93                "prefix" => $cons->getPrefix(),
 
   94                "language" => $cons->getLanguage(),
 
   95                "role" => $cons->getRole(),
 
   96                "active" => $cons->getActive()
 
  106    protected function fillRow(array $a_set): void
 
  108        $this->dic->ctrl()->setParameter($this->
getParentObject(), 
"cid", $a_set[
"id"]);
 
  110        $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
 
  111        $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
 
  112        $this->tpl->setVariable(
"TXT_PREFIX", $a_set[
"prefix"]);
 
  115        $this->tpl->setVariable(
"TXT_LANGUAGE", $a_set[
"language"]);
 
  118            foreach ($obj_types as $obj_type) {
 
  119                $this->tpl->setCurrentBlock(
"objects");
 
  120                $this->tpl->setVariable(
"OBJECTS", 
$GLOBALS[
'DIC']->
language()->txt(
'objs_' . $obj_type));
 
  121                $this->tpl->parseCurrentBlock();
 
  124            $this->tpl->setVariable(
"NO_OBJECTS", 
"-");
 
  129            $this->tpl->setVariable(
'TXT_ROLE', $role->getTitle());
 
  131            $this->tpl->setVariable(
'TXT_ROLE', 
'');
 
  134        if ($a_set[
"active"]) {
 
  135            $this->tpl->setVariable(
"TXT_ACTIVE", $this->dic->language()->txt(
'active'));
 
  136            $label_status = $this->dic->language()->txt(
"deactivate");
 
  138            $this->tpl->setVariable(
"TXT_ACTIVE", $this->dic->language()->txt(
'inactive'));
 
  139            $label_status = $this->dic->language()->txt(
"activate");
 
  144            $list->setId((
string) $a_set[
"id"]);
 
  145            $list->setListTitle($this->dic->language()->txt(
"actions"));
 
  147            $edit_url = $this->dic->ctrl()->getLinkTarget($this->
getParentObject(), 
"editConsumer");
 
  148            $delete_url = $this->dic->ctrl()->getLinkTarget($this->
getParentObject(), 
"deleteLTIConsumer");
 
  149            $status_url = $this->dic->ctrl()->getLinkTarget($this->
getParentObject(), 
"changeStatusLTIConsumer");
 
  150            $list->addItem($this->dic->language()->txt(
"edit"), 
"", $edit_url);
 
  151            $list->addItem($this->dic->language()->txt(
"delete"), 
"", $delete_url);
 
  152            $list->addItem($label_status, 
"", $status_url);
 
  154            $this->tpl->setVariable(
"ACTION", $list->getHTML());
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getGlobalToolConsumerSettings()
Get global consumer settings.
 
static getActiveObjectTypes(int $a_consumer_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
isEditable()
Check if write permission given.
 
__construct(?object $a_parent_obj, string $a_parent_cmd)
 
getItems()
Get consumer data.
 
setEditable(bool $a_status)
Set editable.
 
fillRow(array $a_set)
Fill a single data row.
 
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
setDefaultOrderField(string $a_defaultorderfield)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
 
setData(array $a_data)
Set table data.
 
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc