Commit de605f8d authored by alexpott's avatar alexpott

Issue #2551415 by pfrenssen: Improve documentation of NodePermissions

parent 026e9d87
......@@ -12,7 +12,7 @@
use Drupal\node\Entity\NodeType;
/**
* Defines a class containing permission callbacks.
* Provides dynamic permissions for nodes of different types.
*/
class NodePermissions {
......@@ -20,7 +20,7 @@ class NodePermissions {
use UrlGeneratorTrait;
/**
* Gets an array of node type permissions.
* Returns an array of node type permissions.
*
* @return array
* The node type permissions.
......@@ -37,13 +37,13 @@ public function nodeTypePermissions() {
}
/**
* Builds a standard list of node permissions for a given type.
* Returns a list of node permissions for a given node type.
*
* @param \Drupal\node\Entity\NodeType $type
* The machine name of the node type.
* The node type.
*
* @return array
* An array of permission names and descriptions.
* An associative array of permission names and descriptions.
*/
protected function buildPermissions(NodeType $type) {
$type_id = $type->id();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment