ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilDidacticTemplateCopier Class Reference

Copy a didactic template and all subitems. More...

+ Collaboration diagram for ilDidacticTemplateCopier:

Public Member Functions

 __construct ($a_tpl_id)
 Constructor.
 getTemplateId ()
 Get template id.
 getNewTemplateId ()
 Get new template id.
 start ()
 Start copy.

Private Attributes

 $tpl_id = 0
 $new_tpl_id = 0

Detailed Description

Copy a didactic template and all subitems.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 10 of file class.ilDidacticTemplateCopier.php.

Constructor & Destructor Documentation

ilDidacticTemplateCopier::__construct (   $a_tpl_id)

Constructor.

Parameters
int$a_tpl_id

Definition at line 19 of file class.ilDidacticTemplateCopier.php.

{
$this->tpl_id = $a_tpl_id;
}

Member Function Documentation

ilDidacticTemplateCopier::getNewTemplateId ( )

Get new template id.

Returns
int

Definition at line 37 of file class.ilDidacticTemplateCopier.php.

References $new_tpl_id.

Referenced by start().

{
}

+ Here is the caller graph for this function:

ilDidacticTemplateCopier::getTemplateId ( )

Get template id.

Returns
int

Definition at line 28 of file class.ilDidacticTemplateCopier.php.

References $tpl_id.

Referenced by start().

{
return $this->tpl_id;
}

+ Here is the caller graph for this function:

ilDidacticTemplateCopier::start ( )

Start copy.

Returns
int new template id

Definition at line 47 of file class.ilDidacticTemplateCopier.php.

References ilDidacticTemplateActionFactory\getActionsByTemplateId(), getNewTemplateId(), and getTemplateId().

{
$copy = clone $orig;
$copy->save();
$this->new_tpl_id = $copy->getId();
include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateActionFactory.php';
{
$action->setTemplateId($this->getNewTemplateId());
$new = clone $action;
$new->save();
}
}

+ Here is the call graph for this function:

Field Documentation

ilDidacticTemplateCopier::$new_tpl_id = 0
private

Definition at line 13 of file class.ilDidacticTemplateCopier.php.

Referenced by getNewTemplateId().

ilDidacticTemplateCopier::$tpl_id = 0
private

Definition at line 12 of file class.ilDidacticTemplateCopier.php.

Referenced by getTemplateId().


The documentation for this class was generated from the following file: