19declare(strict_types=1);
57 bool $editable =
false,
58 ?
bool $user_can_write =
null
60 $user_can_write ??= $editable;
61 $URI =
new URI(ILIAS_HTTP_PATH);
62 $origin = $URI->getSchema() .
'://' . $URI->getHost();
65 $title = preg_replace(
'/\.[^.]*$/',
'', $revision->
getTitle())
69 self::BASE_FILE_NAME => $title,
72 self::OWNER_ID => (
string) $revision->
getOwnerId(),
73 self::USER_ID => (
string) $current_user_id,
75 self::SUPPORTS_CONTAINERS =>
false,
76 self::SUPPORTS_DELETE_FILE =>
false,
77 self::SUPPORTS_UPDATE => $editable,
78 self::READ_ONLY => !$editable,
79 self::USER_CAN_WRITE => $user_can_write,
80 self::USER_FRIENDLY_NAME => $lookup_name[
'firstname'] .
' ' . $lookup_name[
'lastname'],
81 self::LAST_MODIFIED_TIME => $revision->
getInformation()->getCreationDate()->format(DATE_ATOM),
82 self::USER_CAN_NOT_WRITE_RELATIVE =>
true,
83 self::POST_MESSAGE_ORIGIN => $origin,
84 self::CLOSE_BUTTON_CLOSES_WINDOW =>
false,
88 self::EDIT_MODE_POST_MESSAGE =>
false,
89 self::EDIT_NOTIFICATION_POST_MESSAGE =>
true,
93 self::CLOSE_POST_MESSAGE =>
false,
94 self::SUPPORTS_LOCKS =>
true,
95 self::SUPPORTS_GET_LOCK =>
true,
96 self::SUPPORTS_EXTENDED_LOCK_LENGTH =>
true,
97 self::USER_CAN_RENAME =>
false
The scope of this class is split ilias-conform URI's into components.
__construct(Revision $revision, int $current_user_id, bool $editable=false, ?bool $user_can_write=null)
$editable describes this session - the file was opened through an edit action and may be written back...
static _lookupName(int $a_user_id)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc