3declare(strict_types=1);
 
   23use Psr\Http\Message\RequestInterface;
 
   58        $this->
setId(
'mount_instructions_documents');
 
   73                    isset(
$column[
'is_checkbox']) ? (
bool) 
$column[
'is_checkbox'] : 
false 
   78        $this->
setTitle($this->
lng->txt(
'webdav_tbl_docs_title'));
 
   79        $this->
setFormAction($this->
ctrl->getFormAction($this->getParentObject(), $command));
 
   87        $this->
setRowTemplate(
'tpl.webdav_documents_row.html', 
'Services/WebDAV');
 
   89        if ($this->is_editable) {
 
  121        if (array_key_exists(
$index, $column_definition)) {
 
  128                is_array($this->visible_optional_columns) &&
 
  129                array_key_exists(
$column[
'field'], $this->visible_optional_columns)
 
  138    final protected function fillRow(array $row): void
 
  145            $this->tpl->setCurrentBlock(
'column');
 
  148                $this->tpl->touchBlock(
'column');
 
  150                $this->tpl->setVariable(
'COLUMN_VALUE', $value);
 
  153            $this->tpl->parseCurrentBlock();
 
  164            'field' => 
'sorting',
 
  165            'txt' => $this->
lng->txt(
'meta_order', 
'meta'),
 
  174            'txt' => $this->
lng->txt(
'webdav_tbl_docs_head_title'),
 
  182            'field' => 
'creation_ts',
 
  183            'txt' => $this->
lng->txt(
'created'),
 
  190            'field' => 
'modification_ts',
 
  191            'txt' => $this->
lng->txt(
'last_change'),
 
  198            'field' => 
'language',
 
  199            'txt' => $this->
lng->txt(
'language'),
 
  205        if ($this->is_editable) {
 
  207                'field' => 
'actions',
 
  208                'txt' => $this->
lng->txt(
'actions'),
 
  259        foreach (
$data[
'items'] as 
$key => $document) {
 
  261                'id' => $document->getId(),
 
  262                'title' => $document->getTitle(),
 
  263                'creation_ts' => $document->getCreationTs(),
 
  264                'modification_ts' => $document->getModificationTs(),
 
  265                'raw_text' => $document->getUploadedInstructions(),
 
  266                'processed_text' => $document->getProcessedInstructions(),
 
  267                'language' => $document->getLanguage(),
 
  274        $function = 
'format' . ucfirst(
$column);
 
  275        if (method_exists($this, $function)) {
 
  276            return $this->{$function}(
$column, $row);
 
  278        if (in_array(
$column, [
'creation_ts', 
'modification_ts'])) {
 
  287        if (!$this->is_editable) {
 
  293        $edit_btn = $this->ui_factory
 
  296                $this->
lng->txt(
'edit'),
 
  297                $this->ctrl->getLinkTarget($this->getParentObject(), 
'showEditDocumentForm')
 
  300        $delete_modal = $this->ui_factory
 
  303                $this->
lng->txt(
'webdav_doc_delete'),
 
  304                $this->lng->txt(
'webdav_sure_delete_documents_s') . 
' ' . $row[
'title'],
 
  305                $this->ctrl->getFormAction($this->getParentObject(), 
'deleteDocument')
 
  308        $delete_btn = $this->ui_factory
 
  310            ->shy($this->
lng->txt(
'delete'), 
'#')
 
  311            ->withOnClick($delete_modal->getShowSignal());
 
  313        $this->ui_components[] = $delete_modal;
 
  317        $drop_down = $this->ui_factory
 
  319            ->standard([$edit_btn, $delete_btn])
 
  320            ->withLabel($this->
lng->txt(
'actions'));
 
  322        return $this->ui_renderer->render($drop_down);
 
  327        if ($row[
'processed_text'] == 
null) {
 
  328            $row[
'processed_text'] = 
'';
 
  332        $url = $uri_builder->getUriToMountInstructionModalByLanguage($row[
'language']);
 
  333        $title_link = $this->ui_factory
 
  336            ->withAdditionalOnLoadCode(fn (
$id) => 
"$('#$id').click(function(){ triggerWebDAVModal('$url');});");
 
  338        return $this->ui_renderer->render([$title_link]);
 
  343        $value = strval(($this->i++) * $this->factor);
 
  344        if (!$this->is_editable) {
 
  349        $sorting_field->setValue($value);
 
  350        $sorting_field->setMaxLength(4);
 
  351        $sorting_field->setSize(2);
 
  353        return $sorting_field->render();
 
  358        return parent::getHTML() . $this->ui_renderer->render($this->ui_components);
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
@classDescription Date and time handling
 
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.
 
determineOffsetAndOrder(bool $a_omit_offset=false)
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
setExternalSegmentation(bool $a_val)
 
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
setFormName(string $a_name="")
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
resetOffset(bool $a_in_determination=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)
 
getExternalSegmentation()
 
setExternalSorting(bool $a_val)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
 
setDefaultOrderDirection(string $a_defaultorderdirection)
 
setData(array $a_data)
Set table data.
 
determineSelectedFilters()
 
setMaxCount(int $a_max_count)
set max.
 
formatCellValue(string $column, array $row)
 
int $num_rendered_criteria
 
setProvider(ilWebDAVMountInstructionsTableDataProvider $provider)
 
formatActions(string $column, array $row)
 
getSelectableColumns()
Get selectable columns.
 
RequestInterface $request
 
ilWebDAVMountInstructionsTableDataProvider $provider
 
ilWebDAVUriBuilder $webdav_uri_builder
 
preProcessData(array &$data)
 
fillRow(array $row)
Standard Version of Fill Row.
 
formatTitle(string $column, array $row)
 
__construct(ilWebDAVMountInstructionsUploadGUI $parent_obj, ilWebDAVUriBuilder $webdav_uri_builder, string $command, Factory $ui_factory, Renderer $ui_renderer, RequestInterface $request, bool $is_editable=false)
 
formatSorting(string $column, array $row)
 
array $visible_optional_columns
 
isColumnVisible(int $index)
 
static maybeRenderWebDAVModalInGlobalTpl()
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This is how the factory for UI elements looks.
 
An entity that renders components to a string output.
 
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
 
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc