You are here

public function TMGMTMessageMetadataController::entityPropertyInfo in Translation Management Tool 7

Overrides EntityDefaultMetadataController::entityPropertyInfo

File

includes/tmgmt.info.inc, line 99
Contains the metadata controller classes for the Translation Management Tool entities.

Class

TMGMTMessageMetadataController
Metadata controller for the job message entity.

Code

public function entityPropertyInfo() {
  $info = parent::entityPropertyInfo();
  $info = _tmgmt_override_property_description($info, $this->type);
  $properties =& $info[$this->type]['properties'];

  // Make the created property appear as date.
  $properties['created']['type'] = 'date';

  // Link the job id property to the corresponding job entity.
  $properties['tjid'] = array(
    'description' => t('Corresponding job entity.'),
    'type' => 'tmgmt_job',
  ) + $properties['tjid'];

  // Link the job item id property to the corresponding job item entity.
  $properties['tjiid'] = array(
    'description' => t('Corresponding job item entity.'),
    'type' => 'tmgmt_job_item',
  ) + $properties['tjiid'];

  // Link user, was added in an update so make sure that it doesn't explode
  // if the schema cache was not cleared.
  $properties['uid'] = array(
    'type' => 'user',
    'description' => t('User associated with TMGMT Job Message entity.'),
  ) + (isset($properties['uid']) ? $properties['uid'] : array());
  return $info;
}