Gets translation data.
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.
The key can be an alphanumeric string.
array $key: If present, only the subarray identified by key is returned.
string $index: Optional index of an attribute below $key.
array A structured data array.
Overrides LocalTaskItemInterface::getData
public function getData($key = array(), $index = NULL) {
$this
->decodeData();
if (empty($this->unserializedData) && $this
->getTask()) {
// Load the data from the source if it has not been set yet.
$this->unserializedData = $this
->getJobItem()
->getData();
$this
->save();
}
if (empty($key)) {
return $this->unserializedData;
}
if ($index) {
$key = array_merge($key, array(
$index,
));
}
return NestedArray::getValue($this->unserializedData, $key);
}