3 require_once 'Pman.php'; /// needed as we might not be included from pman..
5 class Pman_Cms_OutputTranslations extends Pman
7 var $cms_template = '';
16 if(!empty($this->template)){
17 return $this->templateTranslations();
20 if(!empty($this->on_table) && !empty($this->on_id) && !empty($this->on_col)){
21 return $this->tableTranslations();
28 function templateTranslations()
32 $template = DB_DataObject::factory('cms_template');
33 if(!$template->get('template', $this->cms_template)){
37 $base = DB_DataObject::factory('cms_templatestr');
39 'template_id' => $template->id,
44 $base = $base->fetchAll('id', 'mdsum');
46 $translation = DB_DataObject::factory('cms_templatestr');
47 $translation->setFrom(array(
48 'template_id' => $template->id,
49 'lang' => $this->lang,
52 $translation->whereAddIn('src_id', array_keys($base), 'int');
54 $translation = $translation->fetchAll('id', 'txt');
56 print_R($translation);exit;
61 function tableTranslations()