ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ILIAS\File\Capabilities Namespace Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

Namespaces

 Check
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 

Data Structures

class  Capability
 
class  CapabilityBuilder
 
class  CapabilityCollection
 
class  Context
 
class  CoreTypeResolver
 
interface  TypeResolver
 

Enumerations

enum  Capabilities : string { fromName }
 
enum  Permissions : string { ANY }
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Enumeration Type Documentation

◆ Capabilities

enum ILIAS::File::Capabilities::Capabilities : string
Enumerator
fromName 

Definition at line 25 of file Capabilities.php.

25  : string
26 {
27  case EDIT_EXTERNAL = 'editExternal';
28  case INFO_PAGE = 'showSummary';
29  case FORCED_INFO_PAGE = 'showSummaryForced';
30  case MANAGE_VERSIONS = 'versions';
31  case EDIT_SETTINGS = 'edit';
32  case UNZIP = 'unzipCurrentRevision';
33  case DOWNLOAD = 'sendfile';
34  case VIEW_EXTERNAL = 'viewExternal';
35  case NONE = 'none';
36 
37  public static function fromName(string $name): Capabilities
38  {
39  foreach (self::cases() as $case) {
40  if ($name === $case->name) {
41  return $case;
42  }
43  }
44  return self::NONE;
45  }
46 
47  public static function fromCommand(string $cmd): Capabilities
48  {
49  foreach (self::cases() as $case) {
50  if ($cmd === $case->value) {
51  return $case;
52  }
53  }
54  return self::NONE;
55  }
56 
57 }

◆ Permissions

enum ILIAS\File\Capabilities\Capability::Permissions[]
Enumerator
ANY 

Definition at line 25 of file Permissions.php.

25  : string
26 {
27  case NONE = 'none';
28  case VISIBLE = 'visible';
29  case READ = 'read';
30  case VIEW_CONTENT = 'view_content';
31  case READ_LP = 'read_learning_progress';
32  case EDIT_LP = 'edit_learning_progress';
33  case EDIT_PERMISSIONS = 'edit_permission';
34  case WRITE = 'write';
35  case DELETE = 'delete';
36  case COPY = 'copy';
37  case EDIT_CONTENT = 'edit_file';
38 
39  public static function ANY(): array
40  {
41  return [
42  self::VISIBLE,
43  self::READ,
44  self::VIEW_CONTENT,
45  self::READ_LP,
46  self::EDIT_LP,
47  self::EDIT_PERMISSIONS,
48  self::WRITE,
50  self::COPY,
51  self::EDIT_CONTENT
52  ];
53  }
54 
55 }