19 declare(strict_types=1);
49 $this->irss = $DIC->resourceStorage();
50 $this->information = $this->revision->getInformation();
56 $properties = array_merge(
60 $item = $this->ui_factory->item()->standard($this->revision->getTitle())
61 ->withDescription($this->information->getTitle())
62 ->withProperties($properties);
65 return $item->withLeadImage($this->
getImage());
72 return $this->ui_factory->card()->repositoryObject(
73 $this->information->getTitle(),
84 $actions = $this->action_generator->getActionsForRevision($this->revision);
85 if ($actions !== []) {
87 $this->ui_factory->dropdown()->standard(
95 ->withSubheadline($this->revision->getTitle())
112 $src = $this->irss->consume()->flavourUrls($flavour)->getURLsAsArray()[0] ??
null;
115 return $this->ui_factory->image()->responsive(
117 $this->information->getTitle()
118 )->withAlt($this->information->getTitle());
123 return './assets/images/placeholder/file_placeholder.svg';
129 $this->
formatDate($this->information->getCreationDate()),
130 $this->
formatSize($this->information->getSize()),
137 $this->
language->txt(
'file_size') => $this->
formatSize($this->information->getSize()),
138 $this->
language->txt(
'type') => $this->information->getMimeType(),
146 $this->
language->txt(
'create_date') => $this->
formatDate($this->information->getCreationDate()),
148 'revision_status_' . $this->revision->getStatus()->value
getAsItem(bool $with_image)
PreviewDefinition $preview_definition
ActionGenerator $action_generator
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(private Revision $revision, ?ActionGenerator $action_generator=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ResourceIdentification.
withHeadline(string $headline)
Get a row like this with the given headline.
This describes a Row used in Presentation Table.
formatDate(\DateTimeImmutable $date)
__construct(Container $dic, ilPlugin $plugin)
withAction($action)
Get a row like this with a button or a dropdown for actions in the expanded row.
language()
description: > Example for rendring a language glyph.