You are here

function date_repeat_entity_field_access in Date Repeat Entity 7.2

Implements hook_field_access().

File

./date_repeat_entity.module, line 498
Adds functionality to entities with repeating date fields

Code

function date_repeat_entity_field_access($op, $field, $entity_type, $entity, $account) {

  // Block access to the master uuid and clone state fields in both edit and
  // view operations.
  if ($field['field_name'] == DATE_REPEAT_ENTITY_FIELD_MASTER_UUID && !empty($entity)) {
    return FALSE;
  }
  if ($field['field_name'] == DATE_REPEAT_ENTITY_FIELD_CLONE_STATE && !empty($entity)) {
    return FALSE;
  }
  return TRUE;
}