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


PHP ilPlugin类代码示例

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


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

示例1: __construct

 /**
  * @param          $record_type
  * @param ilPlugin $plugin_object
  */
 public function __construct($record_type, ilPlugin $plugin_object = NULL)
 {
     global $tpl, $ilCtrl, $ilAccess, $lng;
     $this->lng = $lng;
     if ($plugin_object) {
         $this->setLngPrefix($plugin_object->getPrefix());
         $plugin_object->loadLanguageModule();
     }
     $this->tpl = $tpl;
     $this->ctrl = $ilCtrl;
     $this->access = $ilAccess;
     $this->plugin_object = $plugin_object;
     $this->record_type = $record_type;
     $this->ar = new $record_type();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:19,代码来源:class.arGUI.php

示例2: __construct

 /**
  *	Constructor logic.
  *
  *	This table GUI constructor method initializes the
  *	object and configures the table rendering.
  */
 public function __construct(ilObjectGUI $a_parent_obj, $a_parent_cmd)
 {
     /**
      *	@var ilCtrl $ilCtrl
      */
     global $ilCtrl;
     /* Pre-configure table */
     $this->setId(sprintf('test_overview_test_list_%d', $a_parent_obj->object->getId()));
     $this->setDefaultOrderDirection('ASC');
     $this->setDefaultOrderField('title');
     // ext ordering with db is ok, but ext limiting with db is not possible,
     // since the rbac filtering is downstream to the db query
     $this->setExternalSorting(true);
     $this->setExternalSegmentation(true);
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setTitle(sprintf($this->lng->txt('rep_robj_xtov_test_list_table_title'), $a_parent_obj->object->getTitle()));
     $plugin = ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'TestOverview');
     $this->setRowTemplate('tpl.simple_object_row.html', $plugin->getDirectory());
     $this->addColumn($this->lng->txt(''), '', '1px', true);
     $this->addColumn($this->lng->txt('rep_robj_xtov_test_list_hdr_test_title'), 'title');
     $this->addColumn($this->lng->txt('rep_robj_xtov_test_list_hdr_test_info'), '');
     $this->setDescription($this->lng->txt('rep_robj_xtov_test_list_description'));
     $this->setFormAction($ilCtrl->getFormAction($this->getParentObject(), 'updateSettings'));
     $this->addCommandButton('initSelectTests', $this->lng->txt('rep_robj_xtov_add_tsts_to_overview'));
     $this->addMultiCommand('removeTests', $this->lng->txt('rep_robj_xtov_remove_from_overview'));
     $this->setShowRowsSelector(true);
     $this->setSelectAllCheckbox('test_ids[]');
     $this->initFilter();
     $this->setFilterCommand('applyTestsFilter');
     $this->setResetCommand('resetTestsFilter');
 }
开发者ID:ionesoft,项目名称:TestOverview,代码行数:37,代码来源:class.ilTestListTableGUI.php

示例3: ilPluginDBUpdate

 /**
  * constructor
  */
 function ilPluginDBUpdate($a_ctype, $a_cname, $a_slot_id, $a_pname, $a_db_handler, $tmp_flag, $a_db_prefix)
 {
     $this->db_prefix = $a_db_prefix;
     // workaround to allow setup migration
     if ($a_db_handler) {
         $this->db =& $a_db_handler;
         if ($tmp_flag) {
             $this->PATH = "./";
         } else {
             $this->PATH = "../";
         }
     } else {
         global $mySetup;
         $this->db = $mySetup->db;
         $this->PATH = "./";
     }
     $this->ctype = $a_ctype;
     $this->cname = $a_cname;
     $this->slot_id = $a_slot_id;
     $this->pname = $a_pname;
     include_once "./Services/Component/classes/class.ilPluginSlot.php";
     $this->slot_name = ilPluginSlot::lookupSlotName($this->ctype, $this->cname, $this->slot_id);
     $this->getCurrentVersion();
     // get update file for current version
     $updatefile = $this->getFileForStep($this->currentVersion + 1);
     $this->current_file = $updatefile;
     $this->DB_UPDATE_FILE = $this->PATH . ilPlugin::getDBUpdateScriptName($this->ctype, $this->cname, $this->slot_name, $this->pname);
     //
     // NOTE: multiple update files for plugins are not supported yet
     //
     $this->LAST_UPDATE_FILE = $this->PATH . ilPlugin::getDBUpdateScriptName($this->ctype, $this->cname, $this->slot_name, $this->pname);
     $this->readDBUpdateFile();
     $this->readLastUpdateFile();
     $this->readFileVersion();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:38,代码来源:class.ilPluginDBUpdate.php

示例4: listObjects

 function listObjects()
 {
     global $tpl, $ilToolbar, $lng, $ilCtrl, $objDefinition;
     $objects = ilObject::getAllOwnedRepositoryObjects($this->user_id);
     if (sizeof($objects)) {
         include_once "Services/Form/classes/class.ilSelectInputGUI.php";
         $sel = new ilSelectInputGUI($lng->txt("type"), "type");
         $ilToolbar->addInputItem($sel, true);
         $ilToolbar->setFormAction($ilCtrl->getFormAction($this, "listObjects"));
         $ilToolbar->addFormButton($lng->txt("ok"), "listObjects");
         $options = array();
         foreach (array_keys($objects) as $type) {
             // #11050
             if (!$objDefinition->isPlugin($type)) {
                 $options[$type] = $lng->txt("obj_" . $type);
             } else {
                 include_once "./Services/Component/classes/class.ilPlugin.php";
                 $options[$type] = ilPlugin::lookupTxt("rep_robj", $type, "obj_" . $type);
             }
         }
         asort($options);
         $sel->setOptions($options);
         $sel_type = (string) $_REQUEST["type"];
         if ($sel_type) {
             $sel->setValue($sel_type);
         } else {
             $sel_type = array_keys($options);
             $sel_type = array_shift($sel_type);
         }
         $ilCtrl->setParameter($this, "type", $sel_type);
     }
     include_once "Services/Object/classes/class.ilObjectOwnershipManagementTableGUI.php";
     $tbl = new ilObjectOwnershipManagementTableGUI($this, "listObjects", $this->user_id, $objects[$sel_type]);
     $tpl->setContent($tbl->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilObjectOwnershipManagementGUI.php

示例5: __construct

 /**
  * 
  * @param object $a_parent_class
  * @param string $a_parent_cmd
  * @return 
  */
 public function __construct($a_parent_class, $a_parent_cmd, $a_type)
 {
     global $lng, $ilCtrl, $ilUser, $objDefinition;
     parent::__construct($a_parent_class, $a_parent_cmd);
     $this->type = $a_type;
     $this->lng = $lng;
     $this->ctrl = $ilCtrl;
     if (!$objDefinition->isPlugin($this->type)) {
         $title = $this->lng->txt('obj_' . $this->type . '_duplicate');
     } else {
         include_once "Services/Component/classes/class.ilPlugin.php";
         $plugin = ilPlugin::getPluginObject(IL_COMP_SERVICE, "Repository", "robj", ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->type));
         $title = $plugin->txt('obj_' . $this->type . '_duplicate');
     }
     $this->setTitle($title);
     $ilUser->getPref('search_max_hits');
     $this->addColumn($this->lng->txt('search_title_description'), 'title', '99%');
     $this->setEnableHeader(true);
     $this->setFormAction($ilCtrl->getFormAction($this->getParentObject()));
     $this->setRowTemplate("tpl.obj_copy_search_result_row.html", "Services/Object");
     $this->setEnableTitle(true);
     $this->setEnableNumInfo(true);
     $this->setDefaultOrderField('title');
     if ($objDefinition->isContainer($this->type)) {
         $this->addCommandButton('saveSource', $this->lng->txt('btn_next'));
     } else {
         $this->addCommandButton('saveSource', $title);
     }
     $this->addCommandButton('cancel', $this->lng->txt('btn_back'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:36,代码来源:class.ilObjectCopySearchResultTableGUI.php

示例6: _getName

 /**
  * Get class name
  */
 function _getName($a_id)
 {
     $name = ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $a_id);
     if ($name != "") {
         return $name;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilRepositoryObjectPlugin.php

示例7: __construct

 /**
  *	Constructor logic.
  *
  *	This table GUI constructor method initializes the
  *	object and configures the table rendering.
  */
 public function __construct(ilObjectGUI $a_parent_obj, $a_parent_cmd)
 {
     /**
      *	@var ilCtrl	$ilCtrl
      */
     global $ilCtrl;
     /* Pre-configure table */
     $this->setId(sprintf("test_overview_membership_list_%d", $a_parent_obj->object->getId()));
     $this->setDefaultOrderDirection('ASC');
     $this->setDefaultOrderField('title');
     $this->setExternalSorting(true);
     $this->setExternalSegmentation(true);
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setTitle(sprintf($this->lng->txt('rep_robj_xtov_membership_list_table_title'), $a_parent_obj->object->getTitle()));
     $plugin = ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'TestOverview');
     $this->setRowTemplate('tpl.simple_object_row.html', $plugin->getDirectory());
     $this->addColumn($this->lng->txt(""), '', '1px', true);
     $this->addColumn($this->lng->txt("rep_robj_xtov_membership_list_hdr_membership_title"), 'title');
     $this->addColumn($this->lng->txt("rep_robj_xtov_membership_list_hdr_membership_info"), '');
     $this->addColumn($this->lng->txt("rep_robj_xtov_item_chosen"), '');
     $this->setDescription($this->lng->txt("rep_robj_xtov_membership_list_description"));
     $this->setFormAction($ilCtrl->getFormAction($this->getParentObject(), 'updateSettings'));
     $this->addMultiCommand('addMemberships', $this->lng->txt('rep_robj_xtov_add_to_overview'));
     $this->addMultiCommand('removeMemberships', $this->lng->txt('rep_robj_xtov_remove_from_overview'));
     $this->setShowRowsSelector(true);
     /* Add 'Select All', configure filters */
     $this->setSelectAllCheckbox('membership_ids[]');
     $this->initFilter();
     $this->setFilterCommand("applyGroupsFilter");
     $this->setResetCommand("resetGroupsFilter");
 }
开发者ID:ionesoft,项目名称:TestOverview,代码行数:37,代码来源:class.ilMembershipListTableGUI.php

示例8: getPlugin

 /**
  * @return object The plugin object
  */
 public function getPlugin()
 {
     if ($this->plugin == null) {
         include_once "./Services/Component/classes/class.ilPlugin.php";
         $this->plugin = ilPlugin::getPluginObject(IL_COMP_MODULE, "TestQuestionPool", "qst", "assAccountingQuestion");
     }
     return $this->plugin;
 }
开发者ID:ilifau,项目名称:assAccountingQuestion,代码行数:11,代码来源:class.assAccountingQuestion.php

示例9: __construct

 /**
  * Constructor.
  */
 function __construct($a_ref_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
 {
     parent::__construct($a_ref_id, $a_id_type, $a_parent_node_id);
     $this->plugin = ilPlugin::getPluginObject(IL_COMP_SERVICE, "Repository", "robj", ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType()));
     if (!is_object($this->plugin)) {
         die("ilObjectPluginGUI: Could not instantiate plugin object for type " . $this->getType() . ".");
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:11,代码来源:class.ilObjectPluginGUI.php

示例10: __construct

 /**
  * Constructor.
  */
 function __construct($a_ref_id = 0)
 {
     $this->initType();
     parent::__construct($a_ref_id, true);
     $this->plugin = ilPlugin::getPluginObject(IL_COMP_SERVICE, "Repository", "robj", ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType()));
     if (!is_object($this->plugin)) {
         die("ilObjectPluginGUI: Could not instantiate plugin object for type " . $this->getType() . ".");
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilObjectPlugin.php

示例11: __construct

 /**
  * Constructor
  *
  * @access public
  */
 public function __construct($a_type_id = 0)
 {
     // this uses the cached plugin object
     $this->plugin_object = ilPlugin::getPluginObject(IL_COMP_SERVICE, 'Repository', 'robj', 'ExternalContent');
     if ($a_type_id) {
         $this->type_id = $a_type_id;
         $this->read();
     }
 }
开发者ID:ilifau,项目名称:ExternalContent,代码行数:14,代码来源:class.ilExternalContentType.php

示例12: getPluginTablePrefix

 public function getPluginTablePrefix()
 {
     $id = $this->getId();
     if (!$id) {
         $rec = ilPlugin::getPluginRecord($this->getComponentType(), $this->getComponentName(), $this->getSlotId(), $this->getPluginName());
         $id = $rec['plugin_id'];
     }
     return $this->getSlotObject()->getPrefix() . "_" . $id;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:9,代码来源:class.ilCloudHookPlugin.php

示例13: addContent

 /**
  *  Add a content to the container
  *
  * @param array $attributes
  */
 public function addContent($attributes)
 {
     /**
      * @var $pluginObj ilPlugin
      *
      */
     $pluginObj = ilPlugin::getPluginObject('Services', 'Repository', 'robj', 'AdobeConnect');
     $pluginObj->includeClass('class.ilAdobeConnectContent.php');
     $this->contents[] = new ilAdobeConnectContent($attributes);
 }
开发者ID:KamuiXenom,项目名称:ILIAS_AdobeConnectPlugin,代码行数:15,代码来源:class.ilAdobeConnectContents.php

示例14: __construct

 /**
  * assJSMEQuestionGUI constructor	
  * The constructor takes possible arguments an creates an instance of the assJSMEQuestionGUI object.
  *
  * @param integer $id The database id of a TemplateQuestion question object
  * @access public
  */
 function __construct($id = -1)
 {
     parent::__construct();
     include_once "./Services/Component/classes/class.ilPlugin.php";
     $plugin = ilPlugin::getPluginObject(IL_COMP_MODULE, "TestQuestionPool", "qst", "assJSMEQuestion");
     $plugin->includeClass("class.assJSMEQuestion.php");
     $this->object = new assJSMEQuestion();
     if ($id >= 0) {
         $this->object->loadFromDb($id);
     }
 }
开发者ID:ba-al,项目名称:ILIAS-ChemistryQuestion44,代码行数:18,代码来源:class.assJSMEQuestionGUI.php

示例15: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng, $objDefinition;
     $img = ilObject::_getIcon($obj_id, "small", $a_set["type"]);
     if (is_file($img)) {
         $alt = $objDefinition->isPlugin($a_set["type"]) ? $lng->txt("icon") . " " . ilPlugin::lookupTxt("rep_robj", $a_set["type"], "obj_" . $a_set["type"]) : $lng->txt("icon") . " " . $lng->txt("obj_" . $a_set["type"]);
         $this->tpl->setVariable("IMG_TYPE", ilUtil::img($img, $alt));
     }
     $this->tpl->setVariable("ID", $a_set["ref_id"]);
     $this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
     $this->tpl->setVariable("VAL_LAST_CHANGE", $a_set["last_update"]);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:class.ilTrashTableGUI.php


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