protected function PublicationDateNodePermissions::buildPermissions in Publication Date 8.2
Same name and namespace in other branches
- 8 src/PublicationDateNodePermissions.php \Drupal\publication_date\PublicationDateNodePermissions::buildPermissions()
Returns a list of node permissions for a given node type.
Parameters
\Drupal\node\Entity\NodeType $type: The node type.
Return value
array An associative array of permission names and descriptions.
Overrides NodePermissions::buildPermissions
File
- src/
PublicationDateNodePermissions.php, line 15 - Contains \Drupal\publication_date\PublicationDateNodePermissions.
Class
Namespace
Drupal\publication_dateCode
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.'),
),
];
}