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


PHP ilTemplate::fillCssFiles方法代码示例

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


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

示例1: 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

示例2: renderRecord

 /**
  * @param bool $editComments
  */
 public function renderRecord($editComments = false)
 {
     global $ilTabs, $tpl, $ilCtrl, $lng;
     $rctpl = new ilTemplate("tpl.record_view.html", false, true, "Modules/DataCollection");
     $ilTabs->setTabActive("id_content");
     $view_id = self::_getViewDefinitionId($this->record_obj);
     if (!$view_id) {
         $ilCtrl->redirectByClass("ildatacollectionrecordlistgui", "listRecords");
     }
     // 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->getRecordFields() 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->getRecordFieldSingleHTML($field->getId()), $html);
     }
     foreach ($table->getStandardFields() as $field) {
         $html = str_ireplace("[" . $field->getId() . "]", $this->record_obj->getRecordFieldSingleHTML($field->getId()), $html);
     }
     $rctpl->setVariable("CONTENT", $html);
     //Permanent Link
     $perma_link = new ilPermanentLinkGUI("dcl", $_GET["ref_id"], "_" . $_GET['record_id']);
     $tpl->setVariable('PRMLINK', $perma_link->getHTML());
     // Buttons for previous/next records
     if ($this->is_enabled_paging) {
         $prevNextLinks = $this->renderPrevNextLinks();
         $rctpl->setVariable('PREV_NEXT_RECORD_LINKS', $prevNextLinks);
         $ilCtrl->clearParameters($this);
         // #14083
         $rctpl->setVariable('FORM_ACTION', $ilCtrl->getFormAction($this));
         $rctpl->setVariable('RECORD', $lng->txt('dcl_record'));
         $rctpl->setVariable('RECORD_FROM_TOTAL', sprintf($lng->txt('dcl_record_from_total'), $this->current_record_position, count($this->record_ids)));
         $rctpl->setVariable('SELECT_OPTIONS', $this->renderSelectOptions());
     }
     // Edit Button
     if ($this->record_obj->hasPermissionToEdit((int) $_GET['ref_id'])) {
         $button = ilLinkButton::getInstance();
         $ilCtrl->setParameterByClass('ildatacollectionrecordeditgui', 'table_id', $this->table->getId());
         $ilCtrl->setParameterByClass('ildatacollectionrecordeditgui', 'redirect', ilDataCollectionRecordEditGUI::REDIRECT_DETAIL);
         $ilCtrl->saveParameterByClass('ildatacollectionrecordeditgui', 'record_id');
         $button->setUrl($ilCtrl->getLinkTargetByClass('ildatacollectionrecordeditgui', 'edit'));
         $button->setCaption($lng->txt('dcl_edit_record'), false);
         $rctpl->setVariable('EDIT_RECORD_BUTTON', $button->render());
     }
     // Comments
     if ($this->table->getPublicCommentsEnabled()) {
         $rctpl->setVariable('COMMENTS', $this->renderComments($editComments));
     }
     $tpl->setContent($rctpl->get());
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:74,代码来源:class.ilDataCollectionRecordViewGUI.php


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