path_file.install in Path File 8
Contains path file install code.
File
path_file.installView source
<?php
/**
* @file
* Contains path file install code.
*/
use Drupal\user\RoleInterface;
/**
* Implements hook_install().
*/
function path_file_install() {
/*
Enable default permissions for system roles.
IMPORTANT: Modules SHOULD NOT automatically grant any user role access
permissions in hook_install().
However, like nodes, the 'View published Path file entity entities'
permission is a very special case, since
this permissions should be extended to anonymous and
authenticated users for almost all use cases.
*/
user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, array(
'View published Path file entity entities',
));
user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, array(
'View published Path file entity entities',
));
}
Functions
Name | Description |
---|---|
path_file_install | Implements hook_install(). |