19 declare(strict_types=1);
32 $this->tpl_id = $a_tpl_id;
39 $db = $DIC->database();
40 $lng = $DIC->language();
42 $query =
'SELECT title FROM didactic_tpl_settings ' .
43 'WHERE title = ' . $db->quote($a_orig_title,
'text');
44 $res = $db->query($query);
53 return $a_orig_title .
' ' .
$lng->txt(
'copy_of_suffix');
55 return $a_orig_title .
' ' . sprintf(
$lng->txt(
'copy_n_of_suffix'), $num);
76 $this->new_tpl_id = $copy->getId();
79 $copy->getIconHandler()->copy($orig);
86 $trans = $orig->getTranslationObject();
87 $copy_trans = $trans->copy($this->new_tpl_id);
88 $copy_trans->addLanguage($trans->getDefaultLanguage(), $copy->getTitle(), $copy->getDescription(),
true,
true);
static appendCopyInfo(string $a_orig_title)
Copy a didactic template and all subitems.
start()
Start copy process.
static getActionsByTemplateId(int $a_tpl_id)
Get actions of one template.
__construct(int $a_tpl_id)