ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 24 of file Capabilities.php.

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

◆ Permissions

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

Definition at line 24 of file Permissions.php.

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