Permissions.php in Display Suite 8.4
File
modules/ds_switch_view_mode/src/Permissions.php
View source
<?php
namespace Drupal\ds_switch_view_mode;
use Drupal\Core\StringTranslation\StringTranslationTrait;
class Permissions {
use StringTranslationTrait;
public function __construct() {
}
public function permissions() {
$permissions = [];
foreach (node_type_get_names() as $key => $name) {
$permissions['ds switch ' . $key] = [
'title' => $this
->t('Switch view modes on :type', [
':type' => $name,
]),
];
}
return $permissions;
}
}
Classes
Name |
Description |
Permissions |
Provides dynamic permissions of the ds switch view mode module. |