![]()  | 
  
    The Hubzilla
    
   | 
 
Public Member Functions | |
| get_permission_description () | |
| get_permission_icon () | |
| get_permission_origin_description () | |
Static Public Member Functions | |
| static | fromDescription ($description) | 
| static | fromStandalonePermission ($perm) | 
| static | fromGlobalPermission ($permname) | 
Private Member Functions | |
| __construct ($global_perm, $channel_perm, $description= '') | |
Private Attributes | |
| $global_perm | |
| $channel_perm | |
| $fallback_description | |
Encapsulates information the ACL dialog requires to describe permission settings for an item with an empty ACL. i.e the caption, icon, and tooltip for the no-ACL option in the ACL dialog.
      
  | 
  private | 
Constructor is private. Use static methods fromGlobalPermission(), fromStandalonePermission(), or fromDescription() to create instances.
      
  | 
  static | 
If the interpretation of an empty ACL can't be summarised with a global default permission or a specific permission setting then use this method and describe what it means instead. Remember to localize the description first.
| string | $description | - the localized caption for the no-ACL option in the ACL dialog. | 
      
  | 
  static | 
This is the preferred way to create a PermissionDescription, as it provides the most details. Use this method if you know an empty ACL will result in one of the global default permissions being used, such as channel_r_stream (for which you would pass 'view_stream').
| string | $permname | - a key for the global perms array from get_perms() in permissions.php, e.g. 'view_stream', 'view_profile', etc. | 
      
  | 
  static | 
Use this method only if the interpretation of an empty ACL doesn't fall back to a global default permission. You should pass one of the constants from boot.php - PERMS_PUBLIC, PERMS_NETWORK etc.
| integer | $perm | - a single enumerated constant permission - PERMS_PUBLIC, PERMS_NETWORK etc. | 
| Zotlabs\Lib\PermissionDescription::get_permission_description | ( | ) | 
Gets a localized description of the permission, or a generic message if the permission is unknown.
| Zotlabs\Lib\PermissionDescription::get_permission_icon | ( | ) | 
Returns an icon css class name if an appropriate one is available, e.g. "fa-globe" for Public, otherwise returns empty string.
| Zotlabs\Lib\PermissionDescription::get_permission_origin_description | ( | ) | 
Returns a localized description of where the permission came from, if this is known. If it's not know, or if the permission is standalone and didn't come from a default permission setting, then empty string is returned.
      
  | 
  private | 
Referenced by Zotlabs\Lib\PermissionDescription\__construct().
      
  | 
  private | 
      
  | 
  private | 
Referenced by Zotlabs\Lib\PermissionDescription\__construct().