protected function JobItem::decodeData

Ensures that the data is decoded.

3 calls to JobItem::decodeData()
JobItem::getData in src/Entity/JobItem.php
Array of the data to be translated.
JobItem::recalculateStatistics in src/Entity/JobItem.php
Recalculate statistical word-data: pending, translated, reviewed, accepted.
JobItem::updateData in src/Entity/JobItem.php
Updates the values for a specific substructure in the data array.

File

src/Entity/JobItem.php, line 1227

Class

JobItem
Entity class for the tmgmt_job_item entity.

Namespace

Drupal\tmgmt\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 = [];
  }
}