3declare(strict_types=1);
 
   98    public function __construct(?
object $a_parent_obj, 
string $a_parent_cmd)
 
  102        $this->
setId(
'providers');
 
  105        $this->
setFormAction($DIC->ctrl()->getFormAction($a_parent_obj, $a_parent_cmd));
 
  106        $this->
setRowTemplate(
'tpl.lti_consume_provider_table_row.html', 
'Modules/LTIConsumer');
 
  108        $this->
setTitle($DIC->language()->txt(
'tbl_provider_header'));
 
  262        parent::determineSelectedColumns();
 
  276                $DIC->language()->txt(
'lti_action_accept_providers_as_global')
 
  283                $DIC->language()->txt(
'lti_action_reset_providers_to_user_scope')
 
  290                $DIC->language()->txt(
'lti_action_delete_providers')
 
  303        $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_icon'), 
'icon');
 
  304        $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_title'), 
'title');
 
  307            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_description'), 
'description');
 
  310            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_category'), 
'category');
 
  313            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_keywords'), 
'keywords');
 
  316            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_outcome'), 
'outcome');
 
  319            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_internal'), 
'external');
 
  322            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_with_key'), 
'provider_key_customizable');
 
  326            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_availability'), 
'availability');
 
  330            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_own_provider'), 
'own_provider');
 
  334            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_provider_creator'), 
'provider_creator');
 
  339                $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_usages_untrashed'), 
'usages_untrashed');
 
  343                $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_usages_trashed'), 
'usages_trashed');
 
  346            $this->
addColumn($DIC->language()->txt(
'tbl_lti_prov_usages'), 
'usages_untrashed');
 
  371        $columns[
'description'] = [
 
  372            'default' => 
true, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_description')
 
  375        $columns[
'category'] = [
 
  376            'default' => 
false, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_category')
 
  379        $columns[
'keywords'] = [
 
  380            'default' => 
true, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_keywords')
 
  383        $columns[
'outcome'] = [
 
  384            'default' => 
false, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_outcome')
 
  387        $columns[
'internal'] = [
 
  388            'default' => 
false, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_internal')
 
  391        $columns[
'with_key'] = [
 
  392            'default' => 
true, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_with_key')
 
  396            $columns[
'availability'] = [
 
  397                'default' => 
true, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_availability')
 
  402            $columns[
'own_provider'] = [
 
  403                'default' => 
false, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_own_provider')
 
  408            $columns[
'provider_creator'] = [
 
  409                'default' => 
false, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_provider_creator')
 
  413        $columns[
'usages_untrashed'] = [
 
  414            'default' => 
true, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_usages_untrashed')
 
  418            $columns[
'usages_trashed'] = [
 
  419                'default' => 
false, 
'txt' => 
$DIC->language()->txt(
'tbl_lti_prov_usages_trashed')
 
  434        $title->readFromSession();
 
  437        $keyword = 
new ilTextInputGUI(
$DIC->language()->txt(
'tbl_lti_prov_keyword'), 
'keyword');
 
  438        $keyword->setMaxLength(64);
 
  439        $keyword->setSize(20);
 
  441        $keyword->readFromSession();
 
  442        $this->
filter[
'keyword'] = $keyword->getValue();
 
  446        $hasOutcome->readFromSession();
 
  447        $this->
filter[
'outcome'] = $hasOutcome->getValue();
 
  451        $isInternal->readFromSession();
 
  452        $this->
filter[
'internal'] = $isInternal->getValue();
 
  456        $isWithKey->readFromSession();
 
  457        $this->
filter[
'with_key'] = $isWithKey->getValue();
 
  460        $category->setOptions(array_merge(
 
  461            [
'' => 
$DIC->language()->txt(
'tbl_lti_prov_all_categories')],
 
  465        $category->readFromSession();
 
  466        $this->
filter[
'category'] = $category->getValue();
 
  469    protected function fillRow(array $a_set): void
 
  472            $this->tpl->setCurrentBlock(
'checkbox_col');
 
  473            $this->tpl->setVariable(
'PROVIDER_ID', $a_set[
'id']);
 
  474            $this->tpl->parseCurrentBlock();
 
  478            $this->tpl->setCurrentBlock(
'title_linked');
 
  479            $this->tpl->setVariable(
'TITLE', $a_set[
'title']);
 
  484            $this->tpl->parseCurrentBlock();
 
  486            $this->tpl->setCurrentBlock(
'title_linked');
 
  487            $this->tpl->setVariable(
'TITLE', $a_set[
'title']);
 
  492            $this->tpl->parseCurrentBlock();
 
  494            $this->tpl->setCurrentBlock(
'title');
 
  495            $this->tpl->setVariable(
'TITLE', $a_set[
'title']);
 
  496            $this->tpl->parseCurrentBlock();
 
  499        if (isset($a_set[
'icon'])) {
 
  500            $this->tpl->setVariable(
'ICON_SRC', $a_set[
'icon']);
 
  501            $this->tpl->setVariable(
'ICON_ALT', basename($a_set[
'icon']));
 
  504            $this->tpl->setVariable(
'ICON_SRC', 
$icon);
 
  505            $this->tpl->setVariable(
'ICON_ALT', 
'lti');
 
  509            $this->tpl->setVariable(
'DESCRIPTION', $a_set[
'description']);
 
  517            $this->tpl->setVariable(
'KEYWORDS', $a_set[
'keywords']);
 
  529            $this->tpl->setVariable(
'WITH_KEY', $this->
getIsWithKeyFormatted(!(
bool) $a_set[
'provider_key_customizable']));
 
  545            $usagesUntrashed = $a_set[
'usages_untrashed'] ? $a_set[
'usages_untrashed'] : 
'';
 
  546            $this->tpl->setVariable(
'USAGES_UNTRASHED', $usagesUntrashed);
 
  550            $usagesTrashed = $a_set[
'usages_trashed'] ? $a_set[
'usages_trashed'] : 
'';
 
  551            $this->tpl->setVariable(
'USAGES_TRASHED', $usagesTrashed);
 
  563        return $hasOutcome ? 
$DIC->language()->txt(
'yes') : 
'';
 
  570        return $isInternal ? 
$DIC->language()->txt(
'yes') : 
'';
 
  577        return $isWithKey ? 
$DIC->language()->txt(
'yes') : 
'';
 
  583        return $categories[$category];
 
  590        switch (
$data[
'availability']) {
 
  593                return $DIC->language()->txt(
'lti_con_prov_availability_create');
 
  597                return $DIC->language()->txt(
'lti_con_prov_availability_existing');
 
  601                return $DIC->language()->txt(
'lti_con_prov_availability_non');
 
  610        if (
$data[
'creator'] == 
$DIC->user()->getId()) {
 
  611            return $DIC->language()->txt(
'yes');
 
  621        if (
$data[
'creator']) {
 
  626                return $user->getFullname();
 
  629            return $DIC->language()->txt(
'deleted_user');
 
  642            return $DIC->ui()->renderer()->render(
 
  643                $DIC->ui()->factory()->dropdown()->standard($items)->withLabel(
 
  644                    $DIC->language()->txt(
'actions')
 
  662            $items[] = 
$DIC->ui()->factory()->button()->shy(
 
  663                $DIC->language()->txt(
'lti_action_edit_provider'),
 
  664                $this->buildProviderLink(
$data[
'id'], $this->getEditProviderCmd())
 
  669            $items[] = 
$DIC->ui()->factory()->button()->shy(
 
  670                $DIC->language()->txt(
'lti_action_accept_provider_as_global'),
 
  671                $this->buildProviderLink(
$data[
'id'], $this->getAcceptProviderAsGlobalCmd())
 
  676            $items[] = 
$DIC->ui()->factory()->button()->shy(
 
  677                $DIC->language()->txt(
'lti_action_reset_provider_to_user_scope'),
 
  678                $this->buildProviderLink(
$data[
'id'], $this->getResetProviderToUserScopeCmd())
 
  683            $items[] = 
$DIC->ui()->factory()->button()->shy(
 
  684                $DIC->language()->txt(
'lti_select_provider'),
 
  685                $this->buildProviderLink(
$data[
'id'], $this->getSelectProviderCmd())
 
  690            $items[] = 
$DIC->ui()->factory()->button()->shy(
 
  691                $DIC->language()->txt(
'lti_delete_provider'),
 
  692                $this->buildProviderLink(
$data[
'id'], $this->getDeleteProviderCmd())
 
  703        $DIC->ctrl()->setParameter($this->parent_obj, 
'provider_id', 
$providerId);
 
  704        $link = 
$DIC->ctrl()->getLinkTarget($this->parent_obj, $command);
 
  705        $DIC->ctrl()->setParameter($this->parent_obj, 
'provider_id', 0);
 
  712        return (
bool) 
$data[
'creator'] && (bool) 
$data[
'accepted_by'];
 
  719        return (
bool) 
$DIC->settings()->get(
'enable_trash', 
"0");
 
static getCategoriesSelectOptions()
 
const AVAILABILITY_CREATE
 
const AVAILABILITY_EXISTING
 
setDetailedUsagesEnabled(bool $detailedUsagesEnabled)
 
setSelectProviderCmd(string $selectProviderCmd)
 
getAvailabilityLabel(array $data)
 
setDeleteProviderCmd(string $deleteProviderCmd)
 
getIsWithKeyFormatted(bool $isWithKey)
 
setDeleteProviderMultiCmd(string $deleteProviderMultiCmd)
 
string $acceptProviderAsGlobalMultiCmd
 
getAcceptProviderAsGlobalMultiCmd()
 
fillRow(array $a_set)
Standard Version of Fill Row.
 
getHasOutcomeFormatted(bool $hasOutcome)
 
getAcceptProviderAsGlobalCmd()
 
setProviderCreatorColumnEnabled(bool $providerCreatorColumnEnabled)
 
setResetProviderToUserScopeMultiCmd(string $resetProviderToUserScopeMultiCmd)
 
setActionsColumnEnabled(bool $actionsColumnEnabled)
 
isUserCreatedProviderResettableToUserScope(array $data)
 
getIsInternalFormatted(bool $isInternal)
 
bool $ownProviderColumnEnabled
 
setEditProviderCmd(string $editProviderCmd)
 
string $deleteProviderCmd
 
string $resetProviderToUserScopeMultiCmd
 
isOwnProviderColumnEnabled()
 
buildActionsListHtml(array $data)
 
isAvailabilityColumnEnabled()
 
getActionItems(array $data)
 
bool $detailedUsagesEnabled
 
isProviderCreatorColumnEnabled()
 
determineSelectedColumns()
 
getProviderCreatorLabel(array $data)
 
setOwnProviderColumnEnabled(bool $ownProviderColumnEnabled)
 
getResetProviderToUserScopeCmd()
 
getCategoryTranslation(string $category)
 
setAcceptProviderAsGlobalMultiCmd(string $acceptProviderAsGlobalMultiCmd)
 
string $deleteProviderMultiCmd
 
string $selectProviderCmd
 
setResetProviderToUserScopeCmd(string $resetProviderToUserScopeCmd)
 
setAcceptProviderAsGlobalCmd(string $acceptProviderAsGlobalCmd)
 
setAvailabilityColumnEnabled(bool $availabilityColumnEnabled)
 
bool $actionsColumnEnabled
 
getResetProviderToUserScopeMultiCmd()
 
__construct(?object $a_parent_obj, string $a_parent_cmd)
 
buildProviderLink(int $providerId, string $command)
 
string $resetProviderToUserScopeCmd
 
isDetailedUsagesEnabled()
 
bool $availabilityColumnEnabled
 
string $acceptProviderAsGlobalCmd
 
bool $providerCreatorColumnEnabled
 
getOwnProviderLabel(array $data)
 
getDeleteProviderMultiCmd()
 
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
 
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
isColumnSelected(string $col)
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
 
addMultiCommand(string $a_cmd, string $a_text)
 
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)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
 
This class represents a text property in a property form.
 
if(empty($clientId)) $providerId
 
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc