You are here

class EditEntityFieldAccessCheck in Quick Edit 7

Access check for editing entity fields.

Hierarchy

Expanded class hierarchy of EditEntityFieldAccessCheck

File

includes/EditEntityFieldAccessCheck.php, line 15

View source
class EditEntityFieldAccessCheck implements EditEntityFieldAccessCheckInterface {

  /**
   * Implements EditEntityFieldAccessCheckInterface::accessEditEntityField().
   */
  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;
  }

}

Members