43 public function init(): void
45 $this->delete_enabled =
true;
46 $this->cut_enabled =
true;
47 $this->copy_enabled =
true;
48 $this->subscribe_enabled =
true;
49 $this->link_enabled =
true;
50 $this->info_screen_enabled =
true;
52 $this->gui_class_name = ilObjFileGUI::class;
61 $info = $this->file_info->getByObjectId($this->obj_id);
66 if ($info->shouldDeliverInline()) {
91 return $this->file_info->getByObjectId($this->obj_id)->shouldDeliverInline()
92 ? $this->type .
'_inline'
100 return $this->file_info->getByObjectId($this->obj_id)->getListTitle();
102 return $this->secure(preg_replace(
'/\\.[a-z0-9]+\\z/i',
'', $this->title));
117 $props = parent::getProperties();
119 $info = $this->file_info->getByObjectId($this->obj_id);
121 $revision = $info->getVersion();
125 "property" =>
$DIC->language()->txt(
"type"),
126 "value" => $info->getSuffix(),
127 'propertyNameVisible' =>
false,
132 "property" =>
$DIC->language()->txt(
"size"),
133 "value" => (
string) $info->getFileSize(),
134 'propertyNameVisible' =>
false,
140 if (parent::checkCommandAccess(
"write",
"versions", $this->ref_id, $this->type)) {
142 $value =
"<a href=\"$link\">" .
$DIC->language()->txt(
"version") .
": $version</a>";
144 $value =
$DIC->language()->txt(
"version") .
": $version";
148 "property" =>
$DIC->language()->txt(
"version"),
150 "propertyNameVisible" =>
false,
156 "property" =>
$DIC->language()->txt(
"last_update"),
160 'propertyNameVisible' =>
false,
163 if ($info->getPageCount() !==
null && $info->getPageCount() > 0) {
166 "property" =>
$DIC->language()->txt(
"page_count"),
167 "value" => $info->getPageCount(),
168 'propertyNameVisible' =>
true,
191 $info = $this->file_info->getByObjectId($this->obj_id);
193 return $info->isZip() && parent::checkCommandAccess(
202 return parent::checkCommandAccess(
214 if ($cmd ===
"sendfile" && $this->context === self::CONTEXT_REPOSITORY) {
220 $info = $this->file_info->getByObjectId($this->obj_id);
222 if ($info->isZip()) {
223 $this->
ctrl->setParameterByClass(ilRepositoryGUI::class,
'ref_id', $this->ref_id);
224 $cmd_link = $this->
ctrl->getLinkTargetByClass(
225 ilRepositoryGUI::class,
228 $this->
ctrl->setParameterByClass(ilRepositoryGUI::class,
'ref_id', $this->requested_ref_id);
230 $access_granted =
false;
235 return parent::getCommandLink($cmd);
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
@classDescription Date and time handling
const CMD_UNZIP_CURRENT_REVISION
static _getCommands()
get commands this method returns an array of all possible commands/permission combinations example: $...
static _getPermanentDownloadLink(int $ref_id)
Gets the permanent download link for the file.
getCommandLink(string $cmd)
Get command link url.
checkCommandAccess(string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
getProperties()
Get item properties.
getTitle()
getTitle overwritten in class.ilObjLinkResourceList.php
getCommandFrame(string $cmd)
Get command target frame.
ilObjFileInfoRepository $file_info
getCommandImage($a_cmd)
Get command icon image.
getIconImageType()
Returns the icon image type.
__construct(int $context=self::CONTEXT_REPOSITORY)
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
trait ilObjFileSecureString
Trait ilObjFileSecureString.