You are here

public function TMGMTJobItemMetadataController::entityPropertyInfo in Translation Management Tool 7

Overrides EntityDefaultMetadataController::entityPropertyInfo

File

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

Class

TMGMTJobItemMetadataController
Metadata controller for the job item entity.

Code

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

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

  // Add the options list for the defined state constants.
  $properties['state']['options list'] = 'tmgmt_job_item_states';

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

  // Add the options list for all available source plugins.
  $properties['plugin']['options list'] = 'tmgmt_source_plugin_labels';
  $properties['word_count']['label'] = t('Word count');
  return $info;
}