/** * Load Original text * * @return string */ private function loadOriginalText() { $string = NenoHelper::getTranslationOriginalText($this->getId(), $this->getContentType()); return $string; }
/** * Get all the strings that needs to be translated. * * @return array */ public function getTranslations() { if (empty($this->translations)) { /* @var $db NenoDatabaseDriverMysqlx */ $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select(array('t.id', 't.content_type', 't.content_id', 't.comment'))->from('`#__neno_jobs_x_translations` AS jt')->innerJoin('`#__neno_content_element_translations` AS t ON jt.translation_id = t.id')->where('job_id = ' . $this->getId()); $db->setQuery($query); $translations = $db->loadAssocList(); $this->translations = array(); foreach ($translations as $translation) { $translationOriginalText = NenoHelper::getTranslationOriginalText($translation['id'], $translation['content_type'], $translation['content_id']); $this->translations[$translation['id']] = array('text' => $translationOriginalText, 'comment' => $translation['comment']); } } return $this->translations; }