final class TeamPermission in Apigee Edge 8
Same name in this branch
- 8 modules/apigee_edge_teams/src/Structure/TeamPermission.php \Drupal\apigee_edge_teams\Structure\TeamPermission
- 8 modules/apigee_edge_teams/src/Plugin/views/access/TeamPermission.php \Drupal\apigee_edge_teams\Plugin\views\access\TeamPermission
Describes a team permission.
Hierarchy
- class \Drupal\apigee_edge_teams\Structure\TeamPermission
Expanded class hierarchy of TeamPermission
4 files declare their use of TeamPermission
- DefaultTeamPermissionsProvider.php in modules/apigee_edge_teams/ src/ DefaultTeamPermissionsProvider.php 
- TeamPermission.php in modules/apigee_edge_teams/ src/ Plugin/ views/ access/ TeamPermission.php 
- TeamPermissionHandler.php in modules/apigee_edge_teams/ src/ TeamPermissionHandler.php 
- TestTeamPermissions.php in modules/apigee_edge_teams/ tests/ modules/ apigee_edge_teams_test/ src/ TestTeamPermissions.php 
File
- modules/apigee_edge_teams/ src/ Structure/ TeamPermission.php, line 28 
Namespace
Drupal\apigee_edge_teams\StructureView source
final class TeamPermission {
  /**
   * The name of the team permission.
   *
   * @var string
   */
  private $name;
  /**
   * The human readable name of the team permission.
   *
   * @var \Drupal\Core\StringTranslation\TranslatableMarkup
   */
  private $label;
  /**
   * The optional description of the team permission.
   *
   * @var \Drupal\Core\StringTranslation\TranslatableMarkup|null
   */
  private $description;
  /**
   * The category of the team permission.
   *
   * @var \Drupal\Core\StringTranslation\TranslatableMarkup
   */
  private $category;
  /**
   * TeamPermission constructor.
   *
   * @param string $name
   *   The unique machine name of the team permission.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup $label
   *   The human-readable name of the team permission, to be shown on the
   *   team permission administration page.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup $category
   *   The category that the team permission belongs (ex.: "Team Apps", the
   *   name of the provider module, etc.), to be shown on the team permission
   *   administration page.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
   *   A description of what the team permission does, to be shown on the team
   *   permission administration page.
   */
  public function __construct(string $name, TranslatableMarkup $label, TranslatableMarkup $category, ?TranslatableMarkup $description = NULL) {
    $this->name = $name;
    $this->label = $label;
    $this->description = $description;
    $this->category = $category;
  }
  /**
   * Returns the unique machine name of the team permission.
   *
   * @return string
   *   The name of the permission.
   */
  public function getName() : string {
    return $this->name;
  }
  /**
   * Returns the human readable name of the team permission.
   *
   * @return \Drupal\Core\StringTranslation\TranslatableMarkup
   *   The human readable name of the permission.
   */
  public function getLabel() : TranslatableMarkup {
    return $this->label;
  }
  /**
   * Returns the description of the team permission.
   *
   * @return \Drupal\Core\StringTranslation\TranslatableMarkup|null
   *   The description of the permission, or NULL.
   */
  public function getDescription() : ?TranslatableMarkup {
    return $this->description;
  }
  /**
   * Returns the category of the team permission.
   *
   * @return \Drupal\Core\StringTranslation\TranslatableMarkup
   *   The category of the team permission.
   */
  public function getCategory() : TranslatableMarkup {
    return $this->category;
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| TeamPermission:: | private | property | The category of the team permission. | |
| TeamPermission:: | private | property | The optional description of the team permission. | |
| TeamPermission:: | private | property | The human readable name of the team permission. | |
| TeamPermission:: | private | property | The name of the team permission. | |
| TeamPermission:: | public | function | Returns the category of the team permission. | |
| TeamPermission:: | public | function | Returns the description of the team permission. | |
| TeamPermission:: | public | function | Returns the human readable name of the team permission. | |
| TeamPermission:: | public | function | Returns the unique machine name of the team permission. | |
| TeamPermission:: | public | function | TeamPermission constructor. | 
