You are here

protected function LocalTaskItem::decodeData in Translation Management Tool 8

Ensures that the data is decoded.

3 calls to LocalTaskItem::decodeData()
LocalTaskItem::getData in translators/tmgmt_local/src/Entity/LocalTaskItem.php
Gets translation data.
LocalTaskItem::recalculateStatistics in translators/tmgmt_local/src/Entity/LocalTaskItem.php
Recalculates statistical word-data: pending, completed, rejected, closed.
LocalTaskItem::updateData in translators/tmgmt_local/src/Entity/LocalTaskItem.php
Updates the values for a specific substructure in the data array.

File

translators/tmgmt_local/src/Entity/LocalTaskItem.php, line 351

Class

LocalTaskItem
Entity class for the local task item entity.

Namespace

Drupal\tmgmt_local\Entity

Code

protected function decodeData() {
  if (empty($this->unserializedData) && $this
    ->get('data')->value) {
    $this->unserializedData = (array) Json::decode($this
      ->get('data')->value);
  }
  if (!is_array($this->unserializedData)) {
    $this->unserializedData = [];
  }
}