当前位置: 首页>>代码示例>>PHP>>正文


PHP ilPlugin::_getDirectory方法代码示例

本文整理汇总了PHP中ilPlugin::_getDirectory方法的典型用法代码示例。如果您正苦于以下问题:PHP ilPlugin::_getDirectory方法的具体用法?PHP ilPlugin::_getDirectory怎么用?PHP ilPlugin::_getDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilPlugin的用法示例。


在下文中一共展示了ilPlugin::_getDirectory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getImagePath

 /**
  * Get image path
  */
 public static final function _getImagePath($a_ctype, $a_cname, $a_slot_id, $a_pname, $a_img)
 {
     $d2 = ilComponent::lookupId($a_ctype, $a_cname) . "_" . $a_slot_id . "_" . ilPlugin::lookupIdForName($a_ctype, $a_cname, $a_slot_id, $a_pname);
     $img = ilUtil::getImagePath($d2 . "/" . $a_img);
     if (is_int(strpos($img, "Customizing"))) {
         return $img;
     }
     $d = ilPlugin::_getDirectory($a_ctype, $a_cname, $a_slot_id, $a_pname);
     return $d . "/templates/images/" . $a_img;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:13,代码来源:class.ilPlugin.php

示例2: readDefinitionData

 /**
  * Read object definition data
  */
 function readDefinitionData()
 {
     global $ilDB, $ilPluginAdmin;
     $this->obj_data = array();
     // Select all object_definitions and collect the definition id's in
     // this array.
     $defIds = array();
     $set = $ilDB->query("SELECT * FROM il_object_def");
     while ($rec = $ilDB->fetchAssoc($set)) {
         $this->obj_data[$rec["id"]] = array("name" => $rec["id"], "class_name" => $rec["class_name"], "location" => $rec["location"], "checkbox" => $rec["checkbox"], "inherit" => $rec["inherit"], "component" => $rec["component"], "translate" => $rec["translate"], "devmode" => $rec["devmode"], "allow_link" => $rec["allow_link"], "allow_copy" => $rec["allow_copy"], "rbac" => $rec["rbac"], "group" => $rec["grp"], "system" => $rec["system"], "default_pos" => "9999" . str_pad($rec["default_pos"], 4, "0", STR_PAD_LEFT), "sideblock" => $rec["sideblock"], 'export' => $rec['export'], 'repository' => $rec['repository'], 'workspace' => $rec['workspace'], 'administration' => $rec['administration'], 'amet' => $rec['amet']);
         $this->obj_data[$rec["id"]]["subobjects"] = array();
         $defIds[] = $rec["id"];
     }
     // get all subobject definitions in a single query
     $set2 = $ilDB->query("SELECT * FROM il_object_subobj WHERE " . $ilDB->in('parent', $defIds, false, 'text'));
     while ($rec2 = $ilDB->fetchAssoc($set2)) {
         $max = $rec2["mmax"];
         if ($max <= 0) {
             $max = "";
         }
         $this->obj_data[$rec2["parent"]]["subobjects"][$rec2["subobj"]] = array("name" => $rec2["subobj"], "max" => $max, "lng" => $rec2["subobj"]);
     }
     $set = $ilDB->query("SELECT * FROM il_object_group");
     $this->obj_group = array();
     while ($rec = $ilDB->fetchAssoc($set)) {
         $this->obj_group[$rec["id"]] = $rec;
     }
     // now get objects from repository plugin
     $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "Repository", "robj");
     foreach ($pl_names as $pl_name) {
         include_once "./Services/Component/classes/class.ilPlugin.php";
         $pl_id = ilPlugin::lookupIdForName(IL_COMP_SERVICE, "Repository", "robj", $pl_name);
         if ($pl_id != "" && !isset($this->obj_data[$pl_id])) {
             include_once "./Services/Repository/classes/class.ilRepositoryObjectPlugin.php";
             $loc = ilPlugin::_getDirectory(IL_COMP_SERVICE, "Repository", "robj", $pl_name) . "/classes";
             $this->obj_data[$pl_id] = array("name" => $pl_id, "class_name" => $pl_name, "plugin" => "1", "location" => $loc, "checkbox" => "1", "inherit" => "0", "component" => "", "translate" => "0", "devmode" => "0", "allow_link" => "1", "allow_copy" => "0", "rbac" => "1", "group" => null, "system" => "0", "default_pos" => "99992000", 'repository' => '1', 'workspace' => '0', 'administration' => '0', "sideblock" => "0");
             $this->obj_data[$rec["id"]]["subobjects"] = array();
             // plugins have to be marked as such - see ilContainerGUI::showPossibleSubObjects()
             $this->obj_data["crs"]["subobjects"][$pl_id] = array("name" => $pl_id, "max" => "", "lng" => $pl_id, "plugin" => true);
             $this->obj_data["fold"]["subobjects"][$pl_id] = array("name" => $pl_id, "max" => "", "lng" => $pl_id, "plugin" => true);
             $this->obj_data["grp"]["subobjects"][$pl_id] = array("name" => $pl_id, "max" => "", "lng" => $pl_id, "plugin" => true);
             $this->obj_data["cat"]["subobjects"][$pl_id] = array("name" => $pl_id, "max" => "", "lng" => $pl_id, "plugin" => true);
             $this->obj_data["root"]["subobjects"][$pl_id] = array("name" => $pl_id, "max" => "", "lng" => $pl_id, "plugin" => true);
         }
     }
     //var_dump($this->obj_data["root"]["subobjects"]);
     //var_dump($this->obj_data2["root"]);
     $set = $ilDB->query("SELECT * FROM il_object_sub_type ");
     $this->sub_types = array();
     while ($rec = $ilDB->fetchAssoc($set)) {
         $this->sub_types[$rec["obj_type"]][] = $rec;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:56,代码来源:class.ilObjectDefinition.php

示例3: _getImagePath

 /**
  * Get image path
  */
 public static final function _getImagePath($a_ctype, $a_cname, $a_slot_id, $a_pname, $a_img)
 {
     $d = ilPlugin::_getDirectory($a_ctype, $a_cname, $a_slot_id, $a_pname);
     return $d . "/templates/images/" . $a_img;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:8,代码来源:class.ilPlugin.php


注:本文中的ilPlugin::_getDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。