getState($this->getName() . '.identifier'); /** @var \Joomla\CMS\Table\Table $table */ $table = $this->getTable(); if (!empty($identifier)) { $return = $table->load(['identifier' => $identifier]); if ($return === false) { if (method_exists($table, 'getError') && $table->getError()) { throw new \RuntimeException($table->getError()); } throw new \RuntimeException(Text::_('JLIB_APPLICATION_ERROR_NOT_EXIST')); } } // Convert to the CMSObject before adding other data. $properties = $table->getProperties(true); $all_properties = $table->getProperties(false); if (!empty($all_properties['_jsonEncode'])) { foreach ($all_properties['$_jsonEncode'] as $prop) { if (array_key_exists($prop, $properties) && is_string($properties[$prop])) { $properties[$prop] = json_decode($properties[$prop]); } } } return ArrayHelper::toObject($properties, CMSObject::class, true); } }