public function PdfUsingMpdfNodeTypePermissions::accessPermissions in PDF using mPDF 8.2
Return permissions
Return value
array|array[]
1 string reference to 'PdfUsingMpdfNodeTypePermissions::accessPermissions'
File
- src/
PdfUsingMpdfNodeTypePermissions.php, line 42
Class
- PdfUsingMpdfNodeTypePermissions
- Generate permissions dynamically for various content types
Namespace
Drupal\pdf_using_mpdfCode
public function accessPermissions() {
$types = $this->entityTypeManager
->getStorage('node_type')
->loadMultiple();
$types = array_map(function ($type) {
return [
'id' => $type
->id(),
'label' => $type
->label(),
];
}, $types);
return $this
->createPerm($types);
}