class FeedsTamperPermissions in Feeds Tamper 8.2
Defines a class containing permission callbacks.
Hierarchy
- class \Drupal\feeds_tamper\FeedsTamperPermissions uses StringTranslationTrait
Expanded class hierarchy of FeedsTamperPermissions
File
- src/
FeedsTamperPermissions.php, line 11
Namespace
Drupal\feeds_tamperView source
class FeedsTamperPermissions {
use StringTranslationTrait;
/**
* Returns an array of feeds tamper permissions.
*
* @return array
* An array of permissions.
*/
public function feedTypeTamperPermissions() {
$perms = [];
foreach (FeedType::loadMultiple() as $type) {
$args = [
'%name' => $type
->label(),
];
/** @var \Drupal\feeds\Entity\FeedType $type */
$perms['tamper ' . $type
->id()] = [
'title' => $this
->t('Tamper %name feed type', $args),
'description' => $this
->t('Create, edit and delete plugins for %name feed type', $args),
];
}
return $perms;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsTamperPermissions:: |
public | function | Returns an array of feeds tamper permissions. | |
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. |