• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilObjStyleSheet类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: importXmlRepresentation

 function importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
 {
     // see ilStyleExporter::getXmlRepresentation()
     if (preg_match("/<StyleSheetExport><ImagePath>(.+)<\\/ImagePath>/", $a_xml, $hits)) {
         $path = $hits[1];
         $a_xml = str_replace($hits[0], "", $a_xml);
         $a_xml = str_replace("</StyleSheetExport>", "", $a_xml);
     }
     // temp xml-file
     $tmp_file = $this->getImportDirectory() . "/sty_" . $a_id . ".xml";
     file_put_contents($tmp_file, $a_xml);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $style = new ilObjStyleSheet();
     $style->createFromXMLFile($tmp_file);
     $new_id = $style->getId();
     unlink($tmp_file);
     // images
     if ($path) {
         $source = $this->getImportDirectory() . "/" . $path;
         if (is_dir($source)) {
             $target = $style->getImagesDirectory();
             if (!is_dir($target)) {
                 ilUtil::makeDirParents($target);
             }
             ilUtil::rCopy($source, $target);
         }
     }
     $a_mapping->addMapping("Services/Style", "sty", $a_id, $new_id);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:29,代码来源:class.ilStyleImporter.php


示例2: getXmlRepresentation

 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
 {
     include_once "Services/Style/classes/class.ilObjStyleSheet.php";
     $style = new ilObjStyleSheet($a_id, false);
     // images
     $target = $this->getAbsoluteExportDirectory();
     if ($target && !is_dir($target)) {
         ilUtil::makeDirParents($target);
     }
     ilUtil::rCopy($style->getImagesDirectory(), $target);
     return "<StyleSheetExport>" . "<ImagePath>" . $this->getRelativeExportDirectory() . "</ImagePath>" . $style->getXML() . "</StyleSheetExport>";
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilStyleExporter.php


示例3: __construct

 /**
  * Constructor
  *
  * @param	object	$a_parent_obj
  * @param	int $table_id 
  * @param	int $a_definition_id 
  */
 public function __construct($table_id, $a_definition_id = 0)
 {
     global $tpl;
     //TODO Permission-Check
     $this->table_id = $table_id;
     if (!$a_definition_id) {
         $a_definition_id = ilDataCollectionRecordViewViewdefinition::getIdByTableId($this->table_id);
     }
     // we always need a page object - create on demand
     if (!$a_definition_id) {
         $viewdef = new ilDataCollectionRecordViewViewdefinition(0, $this->table_id);
         $viewdef->create();
         $a_definition_id = $viewdef->getId();
     }
     parent::__construct("dclf", $a_definition_id);
     // content style (using system defaults)
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->parseCurrentBlock();
     // config
     $this->setPreventHTMLUnmasking(true);
     $this->setEnabledPCTabs(true);
     $this->setEnabledMaps(false);
     $this->setEnabledInternalLinks(false);
     $this->setEnabledWikiLinks(false);
     $this->setEnabledActivation(false);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:38,代码来源:class.ilDataCollectionRecordViewViewdefinitionGUI.php


示例4: getPageHTML

 /**
  * Render COPage
  * 
  * @see ilContainerGUI
  * @return string
  */
 protected function getPageHTML()
 {
     global $tpl, $ilSetting, $ilUser;
     if (!$ilSetting->get("enable_cat_page_edit")) {
         return;
     }
     $page_id = $this->start_object->getObjId();
     // if page does not exist, return nothing
     include_once "./Services/COPage/classes/class.ilPageUtil.php";
     if (!ilPageUtil::_existsAndNotEmpty("cstr", $page_id)) {
         return;
     }
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     include_once "./Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
     $page_gui = new ilContainerStartObjectsPageGUI($page_id);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0));
     $page_gui->setPresentationTitle("");
     $page_gui->setTemplateOutput(false);
     $page_gui->setHeader("");
     return $page_gui->showPage();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilContainerStartObjectsContentGUI.php


示例5: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     global $tpl;
     if (!ilImprint::_exists("impr", 1)) {
         $page = new ilImprint("impr");
         $page->setId(1);
         $page->create();
     }
     // there is only 1 imprint page
     parent::__construct("impr", 1);
     // content style (using system defaults)
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->parseCurrentBlock();
     // config
     $this->setPreventHTMLUnmasking(true);
     $this->setEnabledPCTabs(true);
     $this->setEnabledMaps(false);
     $this->setEnabledInternalLinks(false);
     $this->setEnabledWikiLinks(false);
     $this->setEnabledActivation(true);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:29,代码来源:class.ilImprintGUI.php


示例6: getXmlExportTailDependencies

 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
 {
     $res = array();
     // postings
     include_once "./Modules/Blog/classes/class.ilBlogPosting.php";
     $pg_ids = array();
     foreach ($a_ids as $id) {
         $pages = ilBlogPosting::getAllPostings($id);
         foreach (array_keys($pages) as $p) {
             $pg_ids[] = "blp:" . $p;
         }
     }
     if (sizeof($pg_ids)) {
         $res[] = array("component" => "Services/COPage", "entity" => "pg", "ids" => $pg_ids);
     }
     // style
     $style_ids = array();
     foreach ($a_ids as $id) {
         include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
         $style_id = ilObjStyleSheet::lookupObjectStyle($id);
         if ($style_id > 0) {
             $style_ids[] = $style_id;
         }
     }
     if (sizeof($style_ids)) {
         $res[] = array("component" => "Services/Style", "entity" => "sty", "ids" => $style_ids);
     }
     return $res;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:29,代码来源:class.ilBlogExporter.php


示例7: __construct

 /**
  * Constructor
  */
 function __construct($a_portfolio_id, $a_id = 0, $a_old_nr = 0, $a_enable_comments = true)
 {
     global $tpl, $ilSetting;
     $this->portfolio_id = (int) $a_portfolio_id;
     $this->enable_comments = (bool) $a_enable_comments;
     parent::__construct("prtf", $a_id, $a_old_nr);
     // content style
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->parseCurrentBlock();
     // #11190
     $prfa_set = new ilSetting("prfa");
     $this->setPreventHTMLUnmasking((bool) $prfa_set->get("mask", false));
     // $this->setEnabledMaps(true);
     $this->setEnabledInternalLinks(false);
     $this->setEnabledPCTabs(true);
     $this->setEnabledProfile(true);
     if (!$ilSetting->get('disable_wsp_certificates')) {
         $this->setEnabledVerification(true);
     }
     /* embedding blog postings currently disabled 
     		if(!$ilSetting->get('disable_wsp_blogs'))
     		{
     			$this->setEnabledBlog(true);
     		}		
     		*/
     $skmg_set = new ilSetting("skmg");
     if ($skmg_set->get("enable_skmg")) {
         $this->setEnabledSkills(true);
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:38,代码来源:class.ilPortfolioPageGUI.php


示例8: __construct

 /**
  * @param     $table_id
  * @param int $a_definition_id
  */
 public function __construct($table_id, $a_definition_id = 0)
 {
     global $tpl, $ilCtrl;
     /**
      * @var $ilCtrl ilCtrl
      */
     $this->ctrl = $ilCtrl;
     //TODO Permission-Check
     $this->table_id = $table_id;
     if (!$a_definition_id) {
         $a_definition_id = ilDataCollectionRecordViewViewdefinition::getIdByTableId($this->table_id);
     }
     // we always need a page object - create on demand
     if (!$a_definition_id) {
         $viewdef = new ilDataCollectionRecordViewViewdefinition();
         $viewdef->setTableId($this->table_id);
         $viewdef->setActive(false);
         $viewdef->create();
         $a_definition_id = $viewdef->getId();
     }
     parent::__construct("dclf", $a_definition_id);
     $this->getPageObject()->setTableId($this->table_id);
     // content style (using system defaults)
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->parseCurrentBlock();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilDataCollectionRecordViewViewdefinitionGUI.php


示例9: forwardToPageObject

 public function forwardToPageObject()
 {
     global $lng, $ilTabs;
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget($lng->txt('back'), $this->ctrl->getLinkTarget($this), '_top');
     // page object
     include_once 'Services/COPage/classes/class.ilPageObject.php';
     include_once 'Services/COPage/classes/class.ilPageObjectGUI.php';
     $lng->loadLanguageModule('content');
     include_once './Services/Style/classes/class.ilObjStyleSheet.php';
     $this->tpl->setVariable('LOCATION_CONTENT_STYLESHEET', ilObjStyleSheet::getContentStylePath(0));
     if (!ilPageObject::_exists('shop', self::SHOP_PAGE_EDITOR_PAGE_ID)) {
         // doesn't exist -> create new one
         $new_page_object = new ilPageObject('shop');
         $new_page_object->setParentId(0);
         $new_page_object->setId(self::SHOP_PAGE_EDITOR_PAGE_ID);
         $new_page_object->createFromXML();
     }
     $this->ctrl->setReturnByClass('ilpageobjectgui', 'edit');
     $page_gui = new ilPageObjectGUI('shop', self::SHOP_PAGE_EDITOR_PAGE_ID);
     $page_gui->setIntLinkHelpDefault('StructureObject', self::SHOP_PAGE_EDITOR_PAGE_ID);
     $page_gui->setTemplateTargetVar('ADM_CONTENT');
     $page_gui->setLinkXML('');
     $page_gui->setFileDownloadLink($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'downloadFile'));
     $page_gui->setFullscreenLink($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'displayMediaFullscreen'));
     $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'download_paragraph'));
     $page_gui->setPresentationTitle('');
     $page_gui->setTemplateOutput(false);
     $page_gui->setHeader('');
     $page_gui->setEnabledRepositoryObjects(false);
     $page_gui->setEnabledFileLists(true);
     $page_gui->setEnabledMaps(true);
     $page_gui->setEnabledPCTabs(true);
     return $this->ctrl->forwardCommand($page_gui);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:35,代码来源:class.ilShopInfoGUI.php


示例10: forwardToPageObject

 public function forwardToPageObject()
 {
     /**
      * @var $ilTabs ilTabsGUI
      */
     global $ilTabs;
     if (!(int) $_GET['pobject_id']) {
         ilUtil::sendInfo($this->lng->txt('paya_no_object_selected'));
         return $this->showObjects();
     }
     $this->ctrl->setParameter($this, 'pobject_id', (int) $_GET['pobject_id']);
     $this->__initPaymentObject((int) $_GET['pobject_id']);
     $this->lng->loadLanguageModule('content');
     $ilTabs->clearTargets();
     $ilTabs->clearSubTabs();
     $ilTabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'editDetails'), '_top');
     // page objec
     include_once 'Services/Payment/classes/class.ilShopPage.php';
     include_once 'Services/Payment/classes/class.ilShopPageGUI.php';
     include_once './Services/Style/classes/class.ilObjStyleSheet.php';
     $this->tpl->setVariable('LOCATION_CONTENT_STYLESHEET', ilObjStyleSheet::getContentStylePath(0));
     if (!ilShopPage::_exists('shop', $this->pobject->getPobjectId())) {
         // doesn't exist -> create new one
         $new_page_object = new ilShopPage();
         $new_page_object->setParentId(0);
         $new_page_object->setId($this->pobject->getPobjectId());
         $new_page_object->createFromXML();
     }
     $this->ctrl->setReturnByClass('ilshoppagegui', 'edit');
     $page_gui = new ilShopPageGUI($this->pobject->getPobjectId());
     $this->ctrl->setParameter($page_gui, 'pobject_id', (int) $_GET['pobject_id']);
     return $this->ctrl->forwardCommand($page_gui);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:33,代码来源:class.ilPaymentObjectGUI.php


示例11: executeCommand

 public function executeCommand()
 {
     // $this->prepareOutput();
     switch ($this->ctrl->getNextClass($this)) {
         case "ilcontainerstartobjectspagegui":
             $this->checkPermission("write");
             $this->tabs_gui->clearTargets();
             $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "listStructure"));
             include_once "Services/Container/classes/class.ilContainerStartObjectsPage.php";
             if (!ilContainerStartObjectsPage::_exists("cstr", $this->object->getId())) {
                 // doesn't exist -> create new one
                 $new_page_object = new ilContainerStartObjectsPage();
                 $new_page_object->setParentId($this->object->getId());
                 $new_page_object->setId($this->object->getId());
                 $new_page_object->createFromXML();
                 unset($new_page_object);
             }
             $this->ctrl->setReturnByClass("ilcontainerstartobjectspagegui", "edit");
             include_once "Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
             $pgui = new ilContainerStartObjectsPageGUI($this->object->getId());
             // needed for editor?
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $pgui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0));
             $ret = $this->ctrl->forwardCommand($pgui);
             if ($ret) {
                 $this->tpl->setContent($ret);
             }
             break;
         default:
             $cmd = $this->ctrl->getCmd("listStructure");
             $cmd .= "Object";
             $this->{$cmd}();
             break;
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilContainerStartObjectsGUI.php


示例12: __construct

 /**
  * Constructor
  *
  * @param int $a_node
  * @param object $a_access_handler
  * @param int $a_id
  * @param int $a_old_nr
  * @param bool $a_enable_notes
  * @param bool $a_may_contribute
  * @return ilBlogPostingGUI
  */
 function __construct($a_node_id, $a_access_handler = null, $a_id = 0, $a_old_nr = 0, $a_enable_public_notes = true, $a_may_contribute = true)
 {
     global $tpl, $lng;
     $lng->loadLanguageModule("blog");
     $this->node_id = $a_node_id;
     $this->access_handler = $a_access_handler;
     $this->enable_public_notes = (bool) $a_enable_public_notes;
     parent::__construct("blp", $a_id, $a_old_nr);
     // #11151
     $this->may_contribute = (bool) $a_may_contribute;
     $this->setEnableEditing($a_may_contribute);
     // content style
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->parseCurrentBlock();
     // #11190
     $blga_set = new ilSetting("blga");
     $this->setPreventHTMLUnmasking((bool) $blga_set->get("mask", false));
     $this->setEnabledMaps(true);
     $this->setEnabledInternalLinks(false);
     $this->setEnabledWikiLinks(false);
     $this->setEnabledPCTabs(true);
     $this->setEnabledActivation(true);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:39,代码来源:class.ilBlogPostingGUI.php


示例13: _getCharacteristics

 /**
  * Get characteristics
  */
 static function _getCharacteristics($a_style_id)
 {
     $chars = ilPCSectionGUI::_getStandardCharacteristics();
     if ($a_style_id > 0 && ilObject::_lookupType($a_style_id) == "sty") {
         include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
         $style = new ilObjStyleSheet($a_style_id);
         $chars = $style->getCharacteristics("section");
         $new_chars = array();
         foreach ($chars as $char) {
             if ($chars[$char] != "") {
                 $new_chars[$char] = $chars[$char];
             } else {
                 $new_chars[$char] = $char;
             }
             asort($new_chars);
         }
         $chars = $new_chars;
     }
     return $chars;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:23,代码来源:class.ilPCSectionGUI.php


示例14: __construct

 /**
  * Constructor
  */
 function __construct($a_id = 0, $a_old_nr = 0, $a_wiki_ref_id = 0)
 {
     global $tpl;
     // needed for notifications
     $this->setWikiRefId($a_wiki_ref_id);
     parent::__construct("wpg", $a_id, $a_old_nr);
     $this->getPageObject()->setWikiRefId($this->getWikiRefId());
     // content style
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:16,代码来源:class.ilWikiPageGUI.php


示例15: __construct

 /**
  * Constructor
  */
 function __construct($a_id = 0, $a_old_nr = 0, $a_prevent_get_id = false, $a_lang = "")
 {
     global $tpl;
     parent::__construct("mep", $a_id, $a_old_nr, $a_prevent_get_id, $a_lang);
     // content style
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:16,代码来源:class.ilMediaPoolPageGUI.php


示例16: __construct

 /**
  * Constructor
  */
 function __construct($a_id = 0, $a_old_nr = 0)
 {
     global $tpl;
     parent::__construct("user", $a_id, $a_old_nr);
     // content style
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     $this->setEnabledMaps(true);
     $this->setPreventHTMLUnmasking(true);
     $this->setEnabledInternalLinks(false);
     $this->setEnabledPCTabs(true);
     //		$this->initPageObject($a_id, $a_old_nr);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:18,代码来源:class.ilExtPublicProfilePageGUI.php


示例17: showPage

 function showPage()
 {
     if (!$this->getPageObject()) {
         return;
     }
     switch ($this->getPageObject()->getType()) {
         case ilPortfolioTemplatePage::TYPE_BLOG_TEMPLATE:
             return $this->renderBlogTemplate();
         default:
             // needed for placeholders
             include_once "Services/Style/classes/class.ilObjStyleSheet.php";
             $this->tpl->addCss(ilObjStyleSheet::getPlaceHolderStylePath());
             return parent::showPage();
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:class.ilPortfolioTemplatePageGUI.php


示例18: switch

 function &executeCommand()
 {
     global $ilTabs;
     $next_class = $this->ctrl->getNextClass($this);
     $this->prepareOutput();
     switch ($next_class) {
         case 'ilpermissiongui':
             include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
             $perm_gui =& new ilPermissionGUI($this);
             $ret =& $this->ctrl->forwardCommand($perm_gui);
             break;
         case 'ilimprintgui':
             // page editor will set its own tabs
             $ilTabs->clearTargets();
             $ilTabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, ""));
             include_once "./Services/Imprint/classes/class.ilImprintGUI.php";
             $igui = new ilImprintGUI();
             // needed for editor
             $igui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0, "impr"));
             if (!$this->checkPermissionBool("write")) {
                 $igui->setEnableEditing(false);
             }
             $ret = $this->ctrl->forwardCommand($igui);
             if ($ret != "") {
                 $this->tpl->setContent($ret);
             }
             break;
         case "ilobjectownershipmanagementgui":
             $this->setSystemCheckSubTabs("no_owner");
             include_once "Services/Object/classes/class.ilObjectOwnershipManagementGUI.php";
             $gui = new ilObjectOwnershipManagementGUI(0);
             $this->ctrl->forwardCommand($gui);
             break;
         case "ilcronmanagergui":
             $ilTabs->activateTab("cron_jobs");
             include_once "Services/Cron/classes/class.ilCronManagerGUI.php";
             $gui = new ilCronManagerGUI();
             $this->ctrl->forwardCommand($gui);
             break;
         default:
             //var_dump($_POST);
             $cmd = $this->ctrl->getCmd("view");
             $cmd .= "Object";
             $this->{$cmd}();
             break;
     }
     return true;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:48,代码来源:class.ilObjSystemFolderGUI.php


示例19: __construct

 /**
  * Constructor
  */
 function __construct($a_portfolio_id, $a_id = 0, $a_old_nr = 0, $a_enable_comments = true)
 {
     global $tpl;
     $this->portfolio_id = (int) $a_portfolio_id;
     $this->enable_comments = (bool) $a_enable_comments;
     parent::__construct($this->getParentType(), $a_id, $a_old_nr);
     $this->getPageObject()->setPortfolioId($this->portfolio_id);
     // content style
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->parseCurrentBlock();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:19,代码来源:class.ilPortfolioPageGUI.php


示例20: renderRecord

 /**
  * showRecord
  * a_val = 
  */
 public function renderRecord()
 {
     global $ilTabs, $tpl, $ilCtrl, $lng;
     $rctpl = new ilTemplate("tpl.record_view.html", true, true, "Modules/DataCollection");
     $ilTabs->setTabActive("id_content");
     $view_id = self::_getViewDefinitionId($this->record_obj);
     if (!$view_id) {
         $ilCtrl->redirectByClass("ildatacollectionrecordlistgui", "listRecords");
     }
     // please do not use ilPageObjectGUI directly here, use derived class
     // ilDataCollectionRecordViewViewdefinitionGUI
     //$pageObj = new ilPageObjectGUI("dclf", $view_id);
     // see ilObjDataCollectionGUI->executeCommand about instantiation
     include_once "./Modules/DataCollection/classes/class.ilDataCollectionRecordViewViewdefinitionGUI.php";
     $pageObj = new ilDataCollectionRecordViewViewdefinitionGUI($this->record_obj->getTableId(), $view_id);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $pageObj->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0, "dcl"));
     $html = $pageObj->getHTML();
     $rctpl->addCss("./Services/COPage/css/content.css");
     $rctpl->fillCssFiles();
     $table = ilDataCollectionCache::getTableCache($this->record_obj->getTableId());
     foreach ($table->getFields() as $field) {
         //ILIAS_Ref_Links
         $pattern = '/\\[dcliln field="' . preg_quote($field->getTitle(), "/") . '"\\](.*?)\\[\\/dcliln\\]/';
         if (preg_match($pattern, $html)) {
             $html = preg_replace($pattern, $this->record_obj->getRecordFieldSingleHTML($field->getId(), $this->setOptions("\$1")), $html);
         }
         //DataCollection Ref Links
         $pattern = '/\\[dclrefln field="' . preg_quote($field->getTitle(), "/") . '"\\](.*?)\\[\\/dclrefln\\]/';
         if (preg_match($pattern, $html)) {
             $this->currentField = $field;
             $html = preg_replace_callback($pattern, array($this, "doReplace"), $html);
         }
         $pattern = '/\\[ext tableOf="' . preg_quote($field->getTitle(), "/") . '" field="(.*?)"\\]/';
         if (preg_match($pattern, $html)) {
             $this->currentField = $field;
             $html = preg_replace_callback($pattern, array($this, "doExtReplace"), $html);
         }
         $html = str_ireplace("[" . $field->getTitle() . "]", $this->record_obj->getRecordFieldHTML($field->getId()), $html);
     }
     $rctpl->setVariable("CONTENT", $html);
     //Permanent Link
     include_once "./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php";
     $perma_link = new ilPermanentLinkGUI("dcl", $_GET["ref_id"], "_" . $_GET['record_id']);
     $rctpl->setVariable("PERMA_LINK", $perma_link->getHTML());
     $tpl->setContent($rctpl->get());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:51,代码来源:class.ilDataCollectionRecordViewGUI.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilObjTest类代码示例发布时间:2022-05-23
下一篇:
PHP ilObjRole类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap