public function EditEntityFieldAccessCheck::accessEditEntityField in Quick Edit 7
Implements EditEntityFieldAccessCheckInterface::accessEditEntityField().
Overrides EditEntityFieldAccessCheckInterface::accessEditEntityField
File
- includes/
EditEntityFieldAccessCheck.php, line 20
Class
- EditEntityFieldAccessCheck
- Access check for editing entity fields.
Code
public function accessEditEntityField($entity_type, $entity, $field_name) {
$is_extra_field = _quickedit_is_extra_field($entity_type, $field_name);
$entity_access = entity_access('update', $entity_type, $entity);
$field_access = $is_extra_field ? TRUE : field_access('edit', field_info_field($field_name), $entity_type, $entity);
return $entity_access && $field_access;
}