19 declare(strict_types=1);
27 public static function switchTemplate(
int $a_ref_id,
int $a_new_tpl_id): bool
31 $logger = $DIC->logger()->otpl();
35 $logger->debug(
'Current template id: ' . $current_tpl_id);
37 if ($current_tpl_id) {
38 $logger->debug(
'Reverting template with id: ' . $current_tpl_id);
40 $action->setRefId($a_ref_id);
47 $obj->applyDidacticTemplate($a_new_tpl_id);
static switchTemplate(int $a_ref_id, int $a_new_tpl_id)
Utilities for didactic templates.
static lookupTemplateId(int $a_ref_id)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static getActionsByTemplateId(int $a_tpl_id)
Get actions of one template.