FeedsTamperPermissions.php in Feeds Tamper 8.2
File
src/FeedsTamperPermissions.php
View source
<?php
namespace Drupal\feeds_tamper;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\feeds\Entity\FeedType;
class FeedsTamperPermissions {
use StringTranslationTrait;
public function feedTypeTamperPermissions() {
$perms = [];
foreach (FeedType::loadMultiple() as $type) {
$args = [
'%name' => $type
->label(),
];
$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;
}
}