35        $this->lng = 
$DIC->language();
 
   36        $this->
user = $DIC->user();
 
   37        $this->ctrl = 
$DIC->ctrl();
 
   38        $this->lm_type = $a_lm_type;
 
   40        $this->lang = ($a_lang == 
"")
 
   60        if ($this->lang != 
"-") {
 
   62            return $lmobjtrans->getTitle();
 
   64        return $a_child[
"title"];
 
   75        if ($this->lang != 
"-") {
 
   76            return $a_child[
"title"];
 
   84    public function getMenuItems($a_node, $a_depth, $a_first_child = 
false, $a_next_sibling = 
null, $a_childs = 
null)
 
   91        if ($a_childs == 
null) {
 
   95        if (!$a_first_child) {          
 
   96            if ($a_node[
"type"] == 
"pg" || ($a_node[
"type"] == 
"st" && count($a_childs) == 0 && $this->
getMaxDepth() != 0)) {
 
   97                if ($a_node[
"type"] == 
"st") {
 
   98                    $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_page"), 
"cmd" => 
"insertPage", 
"multi" => 10,
 
   99                        "as_subitem" => 
true);
 
  100                    if (count($this->page_layouts) > 0) {
 
  101                        $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_pagelayout"), 
"cmd" => 
"insertTemplate", 
"multi" => 10,
 
  102                            "as_subitem" => 
true);
 
  104                    if (
$ilUser->clipboardHasObjectsOfType(
"pg")) {
 
  105                        $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_page_from_clip"),
 
  106                            "cmd" => 
"insertPageClip", 
"as_subitem" => 
true);
 
  109                    $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_page"), 
"cmd" => 
"insertPage", 
"multi" => 10);
 
  110                    if (count($this->page_layouts) > 0) {
 
  111                        $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_pagelayout"), 
"cmd" => 
"insertTemplate", 
"multi" => 10);
 
  113                    if (
$ilUser->clipboardHasObjectsOfType(
"pg")) {
 
  114                        $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_page_from_clip"),
 
  115                            "cmd" => 
"insertPageClip");
 
  119            if ($a_node[
"type"] != 
"pg" && $this->
getMaxDepth() != 0) {
 
  120                $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_subchapter"),
 
  121                    "cmd" => 
"insertSubchapter", 
"multi" => 10);
 
  122                if (
$ilUser->clipboardHasObjectsOfType(
"st")) {
 
  123                    $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_subchapter_from_clip"),
 
  124                        "cmd" => 
"insertSubchapterClip");
 
  128            if (($a_next_sibling[
"type"] != 
"pg" && ($a_depth == 0 || $a_next_sibling[
"type"] == 
"st"))
 
  129                || $a_node[
"type"] == 
"st") {
 
  130                $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_chapter"),
 
  131                    "cmd" => 
"insertChapter", 
"multi" => 10);
 
  132                if (
$ilUser->clipboardHasObjectsOfType(
"st")) {
 
  133                    $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_chapter_from_clip"),
 
  134                        "cmd" => 
"insertChapterClip");
 
  138            if ($a_node[
"type"] == 
"st" && $this->
getMaxDepth() != 0) {
 
  139                $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_page"),
 
  140                    "cmd" => 
"insertPage", 
"multi" => 10);
 
  141                if (count($this->page_layouts) > 0) {
 
  142                    $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_pagelayout"), 
"cmd" => 
"insertTemplate", 
"multi" => 10);
 
  144                if (
$ilUser->clipboardHasObjectsOfType(
"pg")) {
 
  145                    $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_page_from_clip"),
 
  146                        "cmd" => 
"insertPageClip");
 
  149            if ($a_childs[0][
"type"] != 
"pg") {
 
  150                $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_chapter"),
 
  151                    "cmd" => 
"insertChapter", 
"multi" => 10);
 
  152                if (
$ilUser->clipboardHasObjectsOfType(
"st")) {
 
  153                    $cmds[] = array(
"text" => 
$lng->txt(
"cont_insert_chapter_from_clip"),
 
  154                        "cmd" => 
"insertChapterClip");
 
  167        if ($a_node[
"type"] == 
"pg") {
 
  178    public function manageDragAndDrop($a_node, $a_depth, $a_first_child_drop_area = 
false, $a_next_sibling = 
null, $a_childs = 
null)
 
  184        if ($a_childs == 
null) {
 
  188        if (!$a_first_child_drop_area) {
 
  189            if ($a_node[
"type"] == 
"pg" || ($a_node[
"type"] == 
"st" && count($a_childs) == 0 && $this->
getMaxDepth() != 0)) {
 
  190                if ($a_node[
"type"] == 
"st") {
 
  194                        $a_first_child_drop_area,
 
  202                        $a_first_child_drop_area,
 
  209            if ($a_node[
"type"] != 
"pg" && $this->
getMaxDepth() != 0) {
 
  213                    $a_first_child_drop_area,
 
  215                    $lng->txt(
"cont_insert_as_subchapter")
 
  219            if (($a_next_sibling[
"type"] != 
"pg" && ($a_depth == 0 || $a_next_sibling[
"type"] == 
"st"))
 
  220                || $a_node[
"type"] == 
"st") {
 
  224                    $a_first_child_drop_area,
 
  226                    $lng->txt(
"cont_insert_as_chapter")
 
  230            if ($a_node[
"type"] == 
"st" && $this->
getMaxDepth() != 0) {
 
  234                    $a_first_child_drop_area,
 
  238            if ($a_childs[0][
"type"] != 
"pg") {
 
  242                    $a_first_child_drop_area,
 
  257        $img = 
"icon_" . $a_item[
"type"] . 
".svg";
 
  259        if ($a_item[
"type"] == 
"pg") {
 
  264                $lm_set->get(
"time_scheduled_page_activation")
 
  268            $img_sc = (
$lm_set->get(
"time_scheduled_page_activation") &&
 
  273            $img = 
"icon_pg" . $img_sc . 
".svg";
 
  276                $img = 
"icon_pg_d" . $img_sc . 
".svg";
 
  283                    $img = 
"icon_pg_del" . $img_sc . 
".svg";
 
  301        if ($a_item[
"type"] == 
"pg") {
 
  305                return $lng->txt(
"cont_page_deactivated");
 
  312                    return $lng->txt(
"cont_page_deactivated_elements");
 
  330        $lm_class = 
"ilobjlearningmodulegui";
 
  333        switch ($a_item[
"type"]) {
 
  340                $commands[] = array(
"text" => 
$lng->txt(
"edit"),
 
  341                    "link" => 
$ilCtrl->getLinkTargetByClass(array($lm_class, 
"illmpageobjectgui"), 
"edit"));
 
  346                    "ilstructureobjectgui",
 
  350                $commands[] = array(
"text" => 
$lng->txt(
"edit"),
 
  351                    "link" => 
$ilCtrl->getLinkTargetByClass(array($lm_class, 
"ilstructureobjectgui"), 
"view"));
 
An exception for terminatinating execution or to throw for unit testing.
Translation information on lm object.
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
static _lookupContainsDeactivatedElements($a_id, $a_parent_type, $a_lang="-")
lookup whether page contains deactivated elements
static _isScheduledActivation($a_id, $a_parent_type, $a_lang="-")
Check whether page is activated by time schedule.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc