You are here

function log_entity_property_info_alter in Log entity 7

Implements hook_entity_property_info_alter().

File

./log.module, line 255
Log - A general purpose record keeping system.

Code

function log_entity_property_info_alter(&$info) {
  $properties =& $info['log']['properties'];
  $properties['name'] = array(
    'label' => t('Name'),
    'description' => t('The name of the log item.'),
    'setter callback' => 'entity_property_verbatim_set',
    'schema field' => 'name',
  );
  $properties['type'] = array(
    'label' => t('Log type'),
    'type' => 'token',
    'description' => t('The type of the log.'),
    'setter callback' => 'entity_property_verbatim_set',
    'access callback' => 'log_properties_access',
    'options list' => 'log_type_get_names',
    'required' => TRUE,
    'schema field' => 'type',
  );
  $properties['uid'] = array(
    'label' => t('Author'),
    'type' => 'user',
    'description' => t('The author of the log.'),
    'setter callback' => 'entity_property_verbatim_set',
    'access callback' => 'log_properties_access',
    'required' => TRUE,
    'schema field' => 'uid',
  );
  $properties['timestamp'] = array(
    'label' => t('Timestamp'),
    'type' => 'date',
    'description' => t('The timestamp of the event being logged.'),
    'setter callback' => 'entity_property_verbatim_set',
    'access callback' => 'log_properties_access',
    'required' => TRUE,
    'schema field' => 'timestamp',
  );
  $properties['created'] = array(
    'label' => t('Created'),
    'type' => 'date',
    'description' => t('The timestamp when the log entity was created.'),
    'setter callback' => 'entity_property_verbatim_set',
    'access callback' => 'log_properties_access',
    'required' => TRUE,
    'schema field' => 'created',
  );
  $properties['changed'] = array(
    'label' => t('Changed'),
    'type' => 'date',
    'description' => t('The timestamp when the log entity was last modified.'),
    'setter callback' => 'entity_property_verbatim_set',
    'access callback' => 'log_properties_access',
    'required' => TRUE,
    'schema field' => 'changed',
  );
  $properties['done'] = array(
    'label' => t('Done'),
    'description' => t('Whether the log is done.'),
    'setter callback' => 'entity_property_verbatim_set',
    'access callback' => 'log_properties_access',
    'schema field' => 'done',
    'type' => 'boolean',
  );
}