<?php /** * @file * Install, update and uninstall for Configuration of all common WCMS. */ use Drupal\uw_cfg_common\UwPermissions\UwPermissions; /** * Implements hook_install(). */ function uw_cfg_common_install() { $permissions_to_process = [ 'Blog' => [ 'Use content type' => [ 'Site manager', 'Content author', 'Content editor', ], 'Create/edit tags' => [ 'Site manager', 'Content author', 'Content editor', ], 'Delete tags' => [ 'Site manager', ], ], 'Event' => [ 'Use content type' => [ 'Site manager', 'Content author', 'Content editor', ], 'Create/edit tags' => [ 'Site manager', 'Content author', 'Content editor', ], 'Delete tags' => [ 'Site manager', ], 'Create/edit types' => [ 'Site manager', 'Content author', 'Content editor', ], 'Delete types' => [ 'Site manager', ], ], 'News' => [ 'Use content type' => [ 'Site manager', 'Content author', 'Content editor', ], 'Create/edit tags' => [ 'Site manager', 'Content author', 'Content editor', ], 'Delete tags' => [ 'Site manager', ], ], 'Site footer' => [ 'Use content type' => [ 'Site manager', 'Content author', 'Content editor', ], ], /*'Special alert' => [ 'Use content type' => [ 'Site manager', 'Content author', 'Content editor', ], ],*/ 'Web page' => [ 'Use content type' => [ 'Site manager', 'Content author', 'Content editor', ], ], ]; UwPermissions::grantRevoke($permissions_to_process, 'grant'); }