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


PHP PageTheme::getSiteTheme方法代码示例

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


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

示例1: install

 public function install($data = array())
 {
     $pkg = parent::install();
     // Set Theme
     // check for active themes
     $active_theme = PageTheme::getSiteTheme();
     // strcmp($active_theme->getThemeHandle(), $themeHandle) == 0
     if (is_object($active_theme) && $active_theme->getThemeHandle() !== 'elemental') {
         // Theme::setThemeHandle($themeHandle);
         // $pt = PageTheme::getByID($pThemeID);
         $pt = PageTheme::getByHandle('elemental');
         $pt->applyToSite();
     }
 }
开发者ID:bergynj,项目名称:concrete5-standard,代码行数:14,代码来源:controller.php

示例2: view

 public function view()
 {
     $tArray = array();
     $tArray2 = array();
     $tArray = PageTheme::getList();
     $tArray2 = PageTheme::getAvailableThemes();
     $this->set('tArray', $tArray);
     $this->set('tArray2', $tArray2);
     $siteThemeID = 0;
     $obj = PageTheme::getSiteTheme();
     if (is_object($obj)) {
         $siteThemeID = $obj->getThemeID();
     }
     $this->set('siteThemeID', $siteThemeID);
     $this->set('activate', View::url('/dashboard/pages/themes', 'activate'));
     $this->set('install', View::url('/dashboard/pages/themes', 'install'));
 }
开发者ID:VonUniGE,项目名称:concrete5-1,代码行数:17,代码来源:controller.php

示例3:

if (!$cp->canEditPageType() && !$cp->canEditPageTheme()) {
	die(t('Access Denied'));
}

$cnt = 0;
for ($i = 0; $i < count($ctArray); $i++) {
	$ct = $ctArray[$i];
	if ($c->getCollectionID() == 1 || $parentCP->canAddSubCollection($ct)) { 
		$cnt++;
	}
}

$plID = $c->getCollectionThemeID();
$ctID = $c->getCollectionTypeID();
if ($plID == 0) {
	$pl = PageTheme::getSiteTheme();
	$plID = $pl->getThemeID();
}
?>

<div class="ccm-ui">
<form method="post" name="ccmThemeForm" action="<?php 
echo $c->getCollectionAction();
?>
">
	<input type="hidden" name="plID" value="<?php 
echo $c->getCollectionThemeID();
?>
" />
	<input type="hidden" name="ctID" value="<?php 
echo $c->getCollectionTypeID();
开发者ID:nveid,项目名称:concrete5,代码行数:31,代码来源:collection_theme.php

示例4: getCollectionThemeObject

 /**
  * Returns Collection's theme object
  * @return PageTheme
  */
 function getCollectionThemeObject()
 {
     if ($this->vObj->ptID < 1) {
         return PageTheme::getSiteTheme();
     } else {
         $pl = PageTheme::getByID($this->vObj->ptID);
         return $pl;
     }
 }
开发者ID:ronlobo,项目名称:concrete5-de,代码行数:13,代码来源:page.php

示例5:

}
if (!isset($editor_selector)) {
    $editor_selector = 'ccm-advanced-editor';
}
if (isset($editor_height)) {
    $textEditorHeight = $editor_height;
}
if (isset($editor_width)) {
    $textEditorWidth = $editor_width;
}
if (!isset($editor_mode)) {
    $txtEditorMode = Config::get('CONTENTS_TXT_EDITOR_MODE');
} else {
    $txtEditorMode = $editor_mode;
}
$theme = PageTheme::getSiteTheme();
?>
<script type="text/javascript">
    var validElementsHtml5 =
        "@[accesskey|draggable|style|class|hidden|tabindex" +
        "|contenteditable|id|title|contextmenu|lang|dir<ltr?rtl|spellcheck" +
        "|onabort|onerror|onmousewheel|onblur|onfocus|onpause|oncanplay|onformchange|onplay" +
        "|oncanplaythrough|onforminput|onplaying|onchange|oninput|onprogress|onclick|oninvalid" +
        "|onratechange|oncontextmenu|onkeydown|onreadystatechange|ondblclick|onkeypress|onscroll" +
        "|ondrag|onkeyup|onseeked|ondragend|onload|onseeking|ondragenter|onloadeddata|onselect" +
        "|ondragleave|onloadedmetadata|onshow|ondragover|onloadstart|onstalled|ondragstart" +
        "|onmousedown|onsubmit|ondrop|onmousemove|onsuspend|ondurationmouseout|ontimeupdate" +
        "|onemptied|onmouseover|onvolumechange|onended|onmouseup|onwaiting]," +
        "a[target<_blank?_self?_top?_parent|ping|media|href|hreflang|type" +
        "|rel<alternate?archives?author?bookmark?external?feed?first?help?index?last?license?" +
        "next?nofollow?noreferrer?prev?search?sidebar?tag?up" +
开发者ID:ronlobo,项目名称:concrete5-de,代码行数:31,代码来源:editor_config.php

示例6: Date

				ccm_composerLastSaveTime = new Date();
				$("#composer-save-status").html('<div class="alert alert-info"><?php 
echo t("Page saved at ");
?>
' + r.time + '</div>');
				$(".ccm-composer-hide-on-approved").show();
				if (callback) {
					callback();
				}
			}
		});
	}
	
	ccm_composerLaunchPreview = function() {
		jQuery.fn.dialog.showLoader();
		<? $t = PageTheme::getSiteTheme(); ?>
		ccm_composerDoAutoSave(function() {
			ccm_previewInternalTheme(<?php 
echo $entry->getCollectionID();
?>
, <?php 
echo $t->getThemeID();
?>
, '<?php 
echo addslashes(str_replace(array("\r", "\n", "\n"), '', $t->getThemeName()));
?>
');
		});
	}
	
	ccm_composerSelectParentPage = function(cID) {
开发者ID:nveid,项目名称:concrete5,代码行数:31,代码来源:write.php

示例7: function

			'dataType': 'json',
			'success': function(r) {
				$('input[name=autosave]').val('0');
				ccm_composerLastSaveTime = new Date();
				$("#composer-save-status").html('<?php echo t("Page saved at ")?>' + r.time);
				$(".ccm-composer-hide-on-approved").show();
				if (callback) {
					callback();
				}
			}
		});
	}
	
	ccm_composerLaunchPreview = function() {
		jQuery.fn.dialog.showLoader();
		<?php  $t = PageTheme::getSiteTheme(); ?>
		ccm_composerDoAutoSave(function() {
			ccm_previewInternalTheme(<?php echo $entry->getCollectionID()?>, <?php echo $t->getThemeID()?>, '<?php echo addslashes(str_replace(array("\r","\n","\n"),'',$t->getThemeName()))?>');
		});
	}
	
	ccm_composerSelectParentPage = function(cID) {
		$("input[name=cPublishParentID]").val(cID);
		$(".ccm-composer-hide-on-no-target").show();
		$("#ccm-composer-publish-location").load('<?php echo $this->action("select_publish_target")?>', {'entryID': <?php echo $entry->getCollectionID()?>, 'cPublishParentID': cID});
		jQuery.fn.dialog.closeTop();

	}	

	ccm_composerSelectParentPageAndSubmit = function(cID) {
		$("input[name=cPublishParentID]").val(cID);
开发者ID:rii-J,项目名称:concrete5-de,代码行数:31,代码来源:write.php

示例8: exportList

	public static function exportList($xml) {
		$nxml = $xml->addChild('themes');
		$list = PageTheme::getList();
		$pst = PageTheme::getSiteTheme();
		
		foreach($list as $pt) {
			$activated = 0;
			if ($pst->getThemeID() == $pt->getThemeID()) {
				$activated = 1;
			}
			$type = $nxml->addChild('theme');
			$type->addAttribute('handle', $pt->getThemeHandle());
			$type->addAttribute('package', $pt->getPackageHandle());
			$type->addAttribute('activated', $activated);
		}

	}
开发者ID:nbourguig,项目名称:concrete5,代码行数:17,代码来源:page_theme.php

示例9: testForUninstall

 /**
  * @return bool|int[] true on success, array of error codes on failure
  */
 public function testForUninstall()
 {
     $errors = array();
     $items = $this->getPackageItems();
     /** @var PageTheme[] $themes */
     $themes = array_get($items, 'page_themes', array());
     // Step 1, check for active themes
     $active_theme = \PageTheme::getSiteTheme();
     foreach ($themes as $theme) {
         if ($active_theme->getThemeID() == $theme->getThemeID()) {
             $errors[] = self::E_PACKAGE_THEME_ACTIVE;
             break;
         }
     }
     return count($errors) ? $errors : true;
 }
开发者ID:ceko,项目名称:concrete5-1,代码行数:19,代码来源:Package.php


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