◆ __construct()
ilCopyWizardPage::__construct |
( |
|
$a_source_id, |
|
|
|
$a_item_type = '' |
|
) |
| |
Constructor.
public
- Parameters
-
Definition at line 53 of file class.ilCopyWizardPage.php.
References $DIC, $lng, $objDefinition, and $tree.
57 $ilObjDataCache = $DIC[
'ilObjDataCache'];
62 $this->source_id = $a_source_id;
63 $this->item_type = $a_item_type;
64 $this->obj_id = $ilObjDataCache->lookupObjId($this->source_id);
65 $this->type = $ilObjDataCache->lookupType($this->obj_id);
◆ fetchSelected()
ilCopyWizardPage::fetchSelected |
( |
|
$a_node_id | ) |
|
|
protected |
◆ fillAdditionalOptions()
ilCopyWizardPage::fillAdditionalOptions |
( |
| ) |
|
|
protected |
◆ fillItemBlock()
ilCopyWizardPage::fillItemBlock |
( |
| ) |
|
|
protected |
Fill item block.
protected
Definition at line 194 of file class.ilCopyWizardPage.php.
References ilCopyWizardOptions\COPY_WIZARD_COPY, ilCopyWizardOptions\COPY_WIZARD_LINK, ilCopyWizardOptions\COPY_WIZARD_OMIT, and fetchSelected().
196 foreach ($this->items as $node) {
200 $this->tpl->setCurrentBlock(
'item_options');
201 $this->tpl->setVariable(
'ITEM_CHECK_NAME',
'cp_options[' . $node[
'child'] .
'][type]');
203 $this->tpl->setVariable(
'ITEM_NAME_OPTION', $this->lng->txt(
'omit'));
205 $this->tpl->setVariable(
'ITEM_CHECKED',
'checked="checked"');
208 $this->tpl->parseCurrentBlock();
211 if ($this->objDefinition->allowCopy($this->item_type)) {
212 $this->tpl->setCurrentBlock(
'item_options');
214 $this->tpl->setVariable(
'ITEM_CHECKED',
'checked="checked"');
216 $this->tpl->setVariable(
'ITEM_CHECK_NAME',
'cp_options[' . $node[
'child'] .
'][type]');
218 $this->tpl->setVariable(
'ITEM_NAME_OPTION', $this->lng->txt(
'copy'));
220 $this->tpl->parseCurrentBlock();
222 if ($this->objDefinition->allowLink($this->item_type)) {
223 $this->tpl->setCurrentBlock(
'item_options');
225 $this->tpl->setVariable(
'ITEM_CHECKED',
'checked="checked"');
227 $this->tpl->setVariable(
'ITEM_CHECK_NAME',
'cp_options[' . $node[
'child'] .
'][type]');
229 $this->tpl->setVariable(
'ITEM_NAME_OPTION', $this->lng->txt(
'link'));
231 $this->tpl->parseCurrentBlock();
235 $this->tpl->setCurrentBlock(
'item_row');
236 $this->tpl->setVariable(
'ITEM_TITLE', $node[
'title']);
237 $this->tpl->setVariable(
'DESCRIPTION', $node[
'description']);
238 $this->tpl->parseCurrentBlock();
fetchSelected($a_node_id)
Check if it is checked.
◆ fillMainBlock()
ilCopyWizardPage::fillMainBlock |
( |
| ) |
|
|
protected |
protected
Definition at line 157 of file class.ilCopyWizardPage.php.
References ilCopyWizardOptions\COPY_WIZARD_COPY, ilCopyWizardOptions\COPY_WIZARD_LINK, ilCopyWizardOptions\COPY_WIZARD_OMIT, and ilUtil\getImagePath().
159 if (count($this->items) > 1) {
160 $this->tpl->setCurrentBlock(
'obj_options');
161 $this->tpl->setVariable(
'NAME_OPTIONS', $this->lng->txt(
'omit_all'));
163 $this->tpl->setVariable(
'JS_TYPE', $this->item_type .
'_omit');
164 $this->tpl->parseCurrentBlock();
166 $this->tpl->setCurrentBlock(
'obj_options');
167 $this->tpl->setVariable(
'NAME_OPTIONS', $this->lng->txt(
'copy_all'));
168 $this->tpl->setVariable(
'OBJ_CHECKED',
'checked="checked"');
170 $this->tpl->setVariable(
'JS_TYPE', $this->item_type .
'_copy');
171 $this->tpl->parseCurrentBlock();
173 if ($this->objDefinition->allowLink($this->item_type)) {
174 $this->tpl->setCurrentBlock(
'obj_options');
175 $this->tpl->setVariable(
'NAME_OPTIONS', $this->lng->txt(
'link_all'));
177 $this->tpl->setVariable(
'JS_TYPE', $this->item_type .
'_link');
178 $this->tpl->parseCurrentBlock();
180 $this->tpl->setVariable(
'OPTION_CLASS',
'option_value');
182 $this->tpl->setVariable(
'OPTION_CLASS',
'option');
185 $this->tpl->setVariable(
'OBJ_ALT', $this->lng->txt(
'objs_' . $this->item_type));
186 $this->tpl->setVariable(
'ROWSPAN', count($this->items) + 1);
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
◆ fillTreeSelection()
ilCopyWizardPage::fillTreeSelection |
( |
|
$a_ref_id, |
|
|
|
$a_type, |
|
|
|
$a_depth |
|
) |
| |
Fill selection template.
public
- Parameters
-
int | ref_id of node |
string | type of current node |
Definition at line 79 of file class.ilCopyWizardPage.php.
References $a_type, $DIC, $tpl, ilCopyWizardOptions\COPY_WIZARD_COPY, ilCopyWizardOptions\COPY_WIZARD_LINK, and ilCopyWizardOptions\COPY_WIZARD_OMIT.
84 $ilAccess = $DIC[
'ilAccess'];
88 $perm_copy = $ilAccess->checkAccess(
'copy',
'', $a_ref_id);
89 $copy = $this->objDefinition->allowCopy(
$a_type);
90 $perm_link = $ilAccess->checkAccess(
'write',
'', $a_ref_id);
91 $link = $this->objDefinition->allowLink(
$a_type);
94 if ($perm_copy
and $copy) {
95 $this->tpl->setCurrentBlock(
'radio_copy');
96 $this->tpl->setVariable(
'TXT_COPY', $this->lng->txt(
'copy'));
97 $this->tpl->setVariable(
'NAME_COPY',
'cp_options[' . $a_ref_id .
'][type]');
99 $this->tpl->setVariable(
'ID_COPY', $a_depth .
'_' .
$a_type .
'_' . $a_ref_id .
'_copy');
100 $this->tpl->setVariable(
'COPY_CHECKED',
'checked="checked"');
101 $this->tpl->parseCurrentBlock();
103 $this->tpl->setCurrentBlock(
'missing_copy_perm');
104 $this->tpl->setVariable(
'TXT_MISSING_COPY_PERM', $this->lng->txt(
'missing_perm'));
105 $this->tpl->parseCurrentBlock();
109 if ($perm_link
and $link) {
110 $this->tpl->setCurrentBlock(
'radio_link');
111 $this->tpl->setVariable(
'TXT_LINK', $this->lng->txt(
'link'));
112 $this->tpl->setVariable(
'NAME_LINK',
'cp_options[' . $a_ref_id .
'][type]');
114 $this->tpl->setVariable(
'ID_LINK', $a_depth .
'_' .
$a_type .
'_' . $a_ref_id .
'_link');
115 if (!$copy
or !$perm_copy) {
116 $this->tpl->setVariable(
'LINK_CHECKED',
'checked="checked"');
118 $this->tpl->parseCurrentBlock();
120 $this->tpl->setCurrentBlock(
'missing_link_perm');
121 $this->tpl->setVariable(
'TXT_MISSING_LINK_PERM', $this->lng->txt(
'missing_perm'));
122 $this->tpl->parseCurrentBlock();
126 $this->tpl->setVariable(
'TXT_OMIT', $this->lng->txt(
'omit'));
127 $this->tpl->setVariable(
'NAME_OMIT',
'cp_options[' . $a_ref_id .
'][type]');
129 $this->tpl->setVariable(
'ID_OMIT', $a_depth .
'_' .
$a_type .
'_' . $a_ref_id .
'_omit');
130 if (((!$copy
or !$perm_copy)
and (!$link
or !$perm_link))) {
131 $this->tpl->setVariable(
'OMIT_CHECKED',
'checked="checked"');
◆ getWizardPageBlockHTML()
ilCopyWizardPage::getWizardPageBlockHTML |
( |
| ) |
|
◆ readItems()
ilCopyWizardPage::readItems |
( |
| ) |
|
|
protected |
◆ $item_type
ilCopyWizardPage::$item_type |
|
private |
◆ $lng
◆ $obj_id
ilCopyWizardPage::$obj_id |
|
private |
◆ $objDefinition
ilCopyWizardPage::$objDefinition |
|
private |
◆ $source_id
ilCopyWizardPage::$source_id |
|
private |
◆ $tree
◆ $type
The documentation for this class was generated from the following file: