You are here

class TMGMTJobItemMetadataController in Translation Management Tool 7

Metadata controller for the job item entity.

Hierarchy

Expanded class hierarchy of TMGMTJobItemMetadataController

1 string reference to 'TMGMTJobItemMetadataController'
tmgmt_entity_info in ./tmgmt.module
Implements hook_entity_info().

File

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

View source
class TMGMTJobItemMetadataController extends EntityDefaultMetadataController {
  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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityDefaultMetadataController::$type protected property
EntityDefaultMetadataController::bundleOptionsList public static function A options list callback returning all bundles for an entity type.
EntityDefaultMetadataController::convertSchema protected function Return a set of properties for an entity based on the schema definition
EntityDefaultMetadataController::__construct public function
TMGMTJobItemMetadataController::entityPropertyInfo public function Overrides EntityDefaultMetadataController::entityPropertyInfo