本文整理汇总了PHP中ilObjStyleSheet::writeStyleUsage方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjStyleSheet::writeStyleUsage方法的具体用法?PHP ilObjStyleSheet::writeStyleUsage怎么用?PHP ilObjStyleSheet::writeStyleUsage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjStyleSheet
的用法示例。
在下文中一共展示了ilObjStyleSheet::writeStyleUsage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doUpdate
protected function doUpdate()
{
global $ilDB;
if ($this->id) {
$ilDB->manipulate("UPDATE il_blog" . " SET notes = " . $ilDB->quote($this->getNotesStatus(), "integer") . ",ppic = " . $ilDB->quote($this->hasProfilePicture(), "integer") . ",bg_color = " . $ilDB->quote($this->getBackgroundColor(), "text") . ",font_color = " . $ilDB->quote($this->getFontcolor(), "text") . ",img = " . $ilDB->quote($this->getImage(), "text") . ",rss_active = " . $ilDB->quote($this->hasRSS(), "text") . ",approval = " . $ilDB->quote($this->hasApproval(), "integer") . " WHERE id = " . $ilDB->quote($this->id, "integer"));
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
ilObjStyleSheet::writeStyleUsage($this->id, $this->getStyleSheetId());
}
}
示例2: finalProcessing
/**
* Final processing
*
* @param array mapping array
*/
function finalProcessing($a_mapping)
{
$blp_map = $a_mapping->getMappingsOfEntity("Services/COPage", "pg");
foreach ($blp_map as $blp_id) {
$blp_id = substr($blp_id, 4);
$blog_id = ilBlogPosting::lookupBlogId($blp_id);
ilBlogPosting::_writeParentId("blp", $blp_id, $blog_id);
}
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$sty_map = $a_mapping->getMappingsOfEntity("Services/Style", "sty");
foreach ($sty_map as $old_sty_id => $new_sty_id) {
if (is_array(ilBlogDataSet::$style_map[$old_sty_id])) {
foreach (ilBlogDataSet::$style_map[$old_sty_id] as $blog_id) {
ilObjStyleSheet::writeStyleUsage($blog_id, $new_sty_id);
}
}
}
}
示例3: doUpdate
protected function doUpdate()
{
global $ilDB;
$fields = array("is_online" => array("integer", $this->isOnline()), "comments" => array("integer", $this->hasPublicComments()), "ppic" => array("integer", $this->hasProfilePicture()), "bg_color" => array("text", $this->getBackgroundColor()), "font_color" => array("text", $this->getFontcolor()), "img" => array("text", $this->getImage()));
$this->doUpdateCustom($fields);
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
ilObjStyleSheet::writeStyleUsage($this->id, $this->getStyleSheetId());
$ilDB->update("usr_portfolio", $fields, array("id" => array("integer", $this->id)));
}
示例4: afterSave
protected function afterSave(ilObject $a_new_object)
{
global $ilUser, $tree;
// add default translation
$a_new_object->addTranslation($a_new_object->getTitle(), $a_new_object->getDescription(), $ilUser->getPref("language"), true);
// default: sort by title
include_once 'Services/Container/classes/class.ilContainerSortingSettings.php';
$settings = new ilContainerSortingSettings($a_new_object->getId());
$settings->setSortMode(ilContainer::SORT_TITLE);
$settings->save();
// inherit parents content style, if not individual
$parent_ref_id = $tree->getParentId($a_new_object->getRefId());
$parent_id = ilObject::_lookupObjId($parent_ref_id);
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$style_id = ilObjStyleSheet::lookupObjectStyle($parent_id);
if ($style_id > 0) {
if (ilObjStyleSheet::_lookupStandard($style_id)) {
ilObjStyleSheet::writeStyleUsage($a_new_object->getId(), $style_id);
}
}
// always send a message
ilUtil::sendSuccess($this->lng->txt("cat_added"), true);
$this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
$this->redirectToRefId($a_new_object->getRefId(), "");
}
示例5: update
/**
* Update object
*/
function update()
{
global $ilDB;
$this->updateMetaData();
$ilDB->manipulate("UPDATE glossary SET " . " is_online = " . $ilDB->quote(ilUtil::tf2yn($this->getOnline()), "text") . "," . " virtual = " . $ilDB->quote($this->getVirtualMode(), "text") . "," . " public_xml_file = " . $ilDB->quote($this->getPublicExportFile("xml"), "text") . "," . " public_html_file = " . $ilDB->quote($this->getPublicExportFile("html"), "text") . "," . " glo_menu_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveGlossaryMenu()), "text") . "," . " downloads_active = " . $ilDB->quote(ilUtil::tf2yn($this->isActiveDownloads()), "text") . ", " . " pres_mode = " . $ilDB->quote($this->getPresentationMode(), "text") . ", " . " show_tax = " . $ilDB->quote((int) $this->getShowTaxonomy(), "integer") . ", " . " snippet_length = " . $ilDB->quote((int) $this->getSnippetLength(), "integer") . " " . " WHERE id = " . $ilDB->quote($this->getId(), "integer"));
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
parent::update();
}
示例6: update
/**
* Update
*/
function update()
{
$ret = parent::update();
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
return $ret;
}
示例7: update
/**
* update object data
*
* @access public
* @return boolean
*/
function update($a_prevent_start_page_creation = false)
{
global $ilDB;
if (!parent::update()) {
return false;
}
$ilDB->update("il_wiki_data", array("is_online" => array("integer", $this->getOnline()), "startpage" => array("text", $this->getStartPage()), "short" => array("text", $this->getShortTitle()), "rating_overall" => array("integer", $this->getRatingOverall()), "rating" => array("integer", $this->getRating()), "rating_side" => array("integer", (bool) $this->getRatingAsBlock()), "rating_new" => array("integer", $this->getRatingForNewPages()), "rating_ext" => array("integer", $this->getRatingCategories()), "public_notes" => array("integer", $this->getPublicNotes()), "introduction" => array("clob", $this->getIntroduction()), "imp_pages" => array("integer", $this->getImportantPages()), "page_toc" => array("integer", $this->getPageToc()), "empty_page_templ" => array("integer", $this->getEmptyPageTemplate())), array("id" => array("integer", $this->getId())));
// check whether start page exists
include_once "./Modules/Wiki/classes/class.ilWikiPage.php";
if (!ilWikiPage::exists($this->getId(), $this->getStartPage()) && !$a_prevent_start_page_creation) {
$start_page = new ilWikiPage();
$start_page->setWikiId($this->getId());
$start_page->setTitle($this->getStartPage());
$start_page->create();
}
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
ilObjStyleSheet::writeStyleUsage($this->getId(), $this->getStyleSheetId());
return true;
}
示例8: doUpdate
protected function doUpdate()
{
global $ilDB;
if ($this->id) {
$ilDB->manipulate("UPDATE il_blog" . " SET ppic = " . $ilDB->quote($this->hasProfilePicture(), "integer") . ",bg_color = " . $ilDB->quote($this->getBackgroundColor(), "text") . ",font_color = " . $ilDB->quote($this->getFontcolor(), "text") . ",img = " . $ilDB->quote($this->getImage(), "text") . ",rss_active = " . $ilDB->quote($this->hasRSS(), "text") . ",approval = " . $ilDB->quote($this->hasApproval(), "integer") . ",abs_shorten = " . $ilDB->quote($this->hasAbstractShorten(), "integer") . ",abs_shorten_len = " . $ilDB->quote($this->getAbstractShortenLength(), "integer") . ",abs_image = " . $ilDB->quote($this->hasAbstractImage(), "integer") . ",abs_img_width = " . $ilDB->quote($this->getAbstractImageWidth(), "integer") . ",abs_img_height = " . $ilDB->quote($this->getAbstractImageHeight(), "integer") . ",keywords = " . $ilDB->quote($this->hasKeywords(), "integer") . ",authors = " . $ilDB->quote($this->hasAuthors(), "integer") . ",nav_mode = " . $ilDB->quote($this->getNavMode(), "integer") . ",nav_list_post = " . $ilDB->quote($this->getNavModeListPostings(), "integer") . ",nav_list_mon = " . $ilDB->quote($this->getNavModeListMonths(), "integer") . ",ov_post = " . $ilDB->quote($this->getOverviewPostings(), "integer") . ",nav_order = " . $ilDB->quote(implode(";", $this->getOrder()), "text") . " WHERE id = " . $ilDB->quote($this->id, "integer"));
// #14661
include_once "./Services/Notes/classes/class.ilNote.php";
ilNote::activateComments($this->id, 0, "blog", $this->getNotesStatus());
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
ilObjStyleSheet::writeStyleUsage($this->id, $this->getStyleSheetId());
}
}