You are here

public function JobItemInterface::getData in Translation Management Tool 8

Array of the data to be translated.

The structure is similar to the form API in the way that it is a possibly nested array with the following properties whose presence indicate that the current element is a text that might need to be translated.

  • #text: The text to be translated.
  • #label: (Optional) The label that might be shown to the translator.
  • #comment: (Optional) A comment with additional information.
  • #translate: (Optional) If set to FALSE the text will not be translated.
  • #translation: The translated data. Set by the translator plugin.
  • #escape: (Optional) List of arrays with a required string key, keyed by the position key. Translators must use this list to prevent translation of these strings if possible.

@todo: Move data item documentation to a new, separate api group.

The key can be any alphanumeric character and '_'.

Parameters

array $key: If present, only the subarray identified by key is returned.

int $index: Optional index of an attribute below $key.

Return value

array A structured data array.

1 method overrides JobItemInterface::getData()
JobItem::getData in src/Entity/JobItem.php
Array of the data to be translated.

File

src/JobItemInterface.php, line 197

Class

JobItemInterface
Interface for tmgmt_job_item entity.

Namespace

Drupal\tmgmt

Code

public function getData($key = array(), $index = NULL);