final class TestTeamPermissions in Apigee Edge 8
Provides dynamic team permissions for testing.
Hierarchy
- class \Drupal\apigee_edge_teams_test\TestTeamPermissions implements DynamicTeamPermissionProviderInterface, ContainerInjectionInterface uses StringTranslationTrait
Expanded class hierarchy of TestTeamPermissions
1 string reference to 'TestTeamPermissions'
- apigee_edge_teams_test.team_permissions.yml in modules/
apigee_edge_teams/ tests/ modules/ apigee_edge_teams_test/ apigee_edge_teams_test.team_permissions.yml - modules/apigee_edge_teams/tests/modules/apigee_edge_teams_test/apigee_edge_teams_test.team_permissions.yml
File
- modules/
apigee_edge_teams/ tests/ modules/ apigee_edge_teams_test/ src/ TestTeamPermissions.php, line 33
Namespace
Drupal\apigee_edge_teams_testView source
final class TestTeamPermissions implements DynamicTeamPermissionProviderInterface, ContainerInjectionInterface {
use StringTranslationTrait;
/**
* TestTeamPermissions constructor.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translation.
*/
public function __construct(TranslationInterface $string_translation) {
$this->stringTranslation = $string_translation;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('string_translation'));
}
/**
* {@inheritdoc}
*/
public function permissions() : array {
return [
new TeamPermission('test team permission 3', $this
->t('Team permission test 3'), $this
->t('Team permission test'), $this
->t('This is the 3rd team test permission.')),
new TeamPermission('test team permission 4', $this
->t('Team permission test 4'), $this
->t('Team permission test')),
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
TestTeamPermissions:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
TestTeamPermissions:: |
public | function |
Returns team permissions provided by a module. Overrides DynamicTeamPermissionProviderInterface:: |
|
TestTeamPermissions:: |
public | function | TestTeamPermissions constructor. |