You are here

public function ParagraphsTypePermissions::paragraphTypePermissions in Paragraphs 8

Returns an array of Paragraphs type permissions.

Return value

array

1 string reference to 'ParagraphsTypePermissions::paragraphTypePermissions'
paragraphs_type_permissions.permissions.yml in modules/paragraphs_type_permissions/paragraphs_type_permissions.permissions.yml
modules/paragraphs_type_permissions/paragraphs_type_permissions.permissions.yml

File

modules/paragraphs_type_permissions/src/ParagraphsTypePermissions.php, line 34

Class

ParagraphsTypePermissions
Defines a class containing permission callbacks.

Namespace

Drupal\paragraphs_type_permissions

Code

public function paragraphTypePermissions() {
  $perms = array();

  // Generate paragraph permissions for all Paragraphs types.
  foreach (ParagraphsType::loadMultiple() as $type) {
    $perms += $this
      ->buildPermissions($type);
  }
  return $perms;
}