class PublicationDateNodePermissions in Publication Date 8.2
Same name and namespace in other branches
- 8 src/PublicationDateNodePermissions.php \Drupal\publication_date\PublicationDateNodePermissions
Hierarchy
- class \Drupal\node\NodePermissions uses StringTranslationTrait
- class \Drupal\publication_date\PublicationDateNodePermissions
Expanded class hierarchy of PublicationDateNodePermissions
File
- src/
PublicationDateNodePermissions.php, line 13 - Contains \Drupal\publication_date\PublicationDateNodePermissions.
Namespace
Drupal\publication_dateView source
class PublicationDateNodePermissions extends NodePermissions {
protected function buildPermissions(NodeType $type) {
$type_id = $type
->id();
$type_params = array(
'%type_name' => $type
->label(),
);
return [
"set {$type_id} published on date" => array(
'title' => $this
->t('Modify %type_name "Published On" date.', $type_params),
'description' => $this
->t('Change the "Published On" date for this content type.'),
),
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NodePermissions:: |
public | function | Returns an array of node type permissions. | |
PublicationDateNodePermissions:: |
protected | function |
Returns a list of node permissions for a given node type. Overrides NodePermissions:: |
|
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. |