aboutsummaryrefslogtreecommitdiff
path: root/lib/models/FileRef.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models/FileRef.php')
-rw-r--r--lib/models/FileRef.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/models/FileRef.php b/lib/models/FileRef.php
index 48c64dc..9cc2438 100644
--- a/lib/models/FileRef.php
+++ b/lib/models/FileRef.php
@@ -60,6 +60,7 @@ class FileRef extends SimpleORMap implements PrivacyObject, FeedbackRange
$config['additional_fields']['download_url']['set'] = 'setDownloadURL';
$config['additional_fields']['download_url']['get'] = 'getDownloadURL';
$config['additional_fields']['author_name']['get'] = 'getAuthorName';
+ $config['additional_fields']['is_accessible']['get'] = 'getAccessibility';
$config['additional_fields']['is_link']['get'] = 'isLink';
$config['additional_fields']['foldertype']['set'] = 'setFolderType';
$config['additional_fields']['foldertype']['get'] = 'getFolderType';
@@ -190,6 +191,14 @@ class FileRef extends SimpleORMap implements PrivacyObject, FeedbackRange
}
/**
+ * Returns true if the file is accessible
+ */
+ public function getAccessibility() : bool
+ {
+ return (bool) $this->file->is_accessible;
+ }
+
+ /**
* This method increments the download counter of the FileRef.
*
* @return int The number of rows of the file_refs table that have been altered.