You are here

class TMGMTMessageMetadataController in Translation Management Tool 7

Metadata controller for the job message entity.

Hierarchy

Expanded class hierarchy of TMGMTMessageMetadataController

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

File

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

View source
class TMGMTMessageMetadataController extends EntityDefaultMetadataController {

  /**
   * {@inheritdoc}
   */
  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;
  }

}

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
TMGMTMessageMetadataController::entityPropertyInfo public function Overrides EntityDefaultMetadataController::entityPropertyInfo