function hook_entityform_access_alter in Entityform 7.2
Alter whether a user should have access to an operation on an entityform.
Parameters
boolean $access:
string $op:
array $context: An associative array containing the following keys:
- entityform: The entityform submission If $op == 'submit' this will be a new Entityform Submission for the type.
- account: The Drupal user account that is doing the operation.
1 function implements hook_entityform_access_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- entityform_anonymous_entityform_access_alter in entityform_anonymous/
entityform_anonymous.module - Implements hook_entityform_access_alter().
1 invocation of hook_entityform_access_alter()
- entityform_access in ./
entityform.module - Determines whether the given user has access to a entityform.
File
- ./
entityform.api.php, line 67 - Hooks provided by the Entityform module.
Code
function hook_entityform_access_alter(&$access, $op, array $context) {
$entityform = $context['entityform'];
// Only allow editing of draft forms.
if ($op == 'edit' && empty($entityform->draft)) {
$access = FALSE;
}
}