本文整理汇总了PHP中Member::add_extension方法的典型用法代码示例。如果您正苦于以下问题:PHP Member::add_extension方法的具体用法?PHP Member::add_extension怎么用?PHP Member::add_extension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Member
的用法示例。
在下文中一共展示了Member::add_extension方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
// clear cache
SS_Cache::factory('local_cache')->clean(Zend_Cache::CLEANING_MODE_ALL);
Member::add_extension('CacheableExtension');
}
示例2: addExtensions
/**
* Add the given array of member extensions as class names.
* This is useful for re-adding extensions after being removed
* in a test case to produce an unbiased test.
*
* @param array $extensions
* @return array The added extensions
*/
protected function addExtensions($extensions)
{
if ($extensions) {
foreach ($extensions as $extension) {
Member::add_extension($extension);
}
}
return $extensions;
}
示例3:
<?php
Member::add_extension('Member', 'BusinessMember');
DataObject::add_extension('SiteTree', 'BrowseBusinessDecorator');
Object::add_extension('ContentController', 'BrowseBusinessDecorator_Controller');
//=============================== START business_directory =====================================
//BrowseBusinessDecorator::get_classes_that_can_have_businesses_as_children(array("BusinessListingPage"));
//=============================== END business_directory =====================================
示例4:
<?php
// If subsites is installed
if (class_exists('Users_Account_Controller')) {
Users_Account_Controller::add_extension('OrdersUserAccountControllerExtension');
Member::add_extension('OrdersMemberExtension');
}
// If subsites is installed
if (class_exists('Subsite')) {
Order::add_extension('SubsitesOrdersExtension');
OrderAdmin::add_extension('SubsiteMenuExtension');
}
// If subsites is installed
if (class_exists('SiteConfig')) {
SiteConfig::add_extension('OrdersSiteConfigExtension');
}
示例5: array
<?php
Member::add_extension('FrameworkTestRole');
Member::add_extension('FileUploadRole');
SiteTree::add_extension('FrameworkTestSiteTreeExtension');
File::add_extension('FrameworkTestFileExtension');
if (class_exists('SiteTreeCMSWorkflow')) {
SiteConfig::add_extension('CMSWorkflowSiteConfigDecorator');
CMSWorkflowSiteConfigDecorator::apply_active_config();
}
Director::addRules(100, array('dev/regress/$Action/$ID' => 'FrameworktestRegressSessionAdmin'));
if (@$_GET['db']) {
$enabletranslatable = @$_GET['enabletranslatable'];
} elseif (@$_SESSION['db']) {
$enabletranslatable = @$_SESSION['enabletranslatable'];
} else {
$enabletranslatable = null;
}
if ($enabletranslatable) {
SiteTree::add_extension('Translatable');
SiteConfig::add_extension('Translatable');
}
示例6:
<?php
Member::add_extension('MemberDecorator');
示例7: define
<?php
// define this directory
define('DEVTOOLS_DIR', 'dev-tools');
// create definition of site name (based on SS_PRIMARY_DOMAIN)
$siteName = SS_PRIMARY_DOMAIN;
$siteName = str_replace('http://', '', $siteName);
$siteName = str_replace('https://', '', $siteName);
$siteName = str_replace('.', '_', $siteName);
define('SS_SITE_NAME', $siteName);
// detect if we're using the old domain and need to flag the issue
$fullDomain = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
if ($fullDomain != SS_PRIMARY_DOMAIN && SS_ENVIRONMENT_TYPE == 'live') {
define('DEVTOOLS_ISOLDDOMAIN', true);
// if we're disabled, include our cms-disabling javascript
Requirements::customScript('var ss_primary_domain = "' . SS_PRIMARY_DOMAIN . '";');
LeftAndMain::require_javascript(DEVTOOLS_DIR . '/js/disable-cms.js');
} else {
define('DEVTOOLS_ISOLDDOMAIN', false);
}
// add functionality to SiteTree
ContentController::add_extension('DebugTools_ContentControllerExtension');
SiteConfig::add_extension('DebugTools_SiteConfigExtension');
Member::add_extension('DebugTools_MemberExtension');
// include css
LeftAndMain::require_css(DEVTOOLS_DIR . '/css/cms.css');
// specify editor css file (this needs to be pure CSS, not SCSS)
HtmlEditorConfig::get('cms')->setOption('content_css', '/site/cms/editor.css');
// enable our log jam logger
LogJam::EnableLog();
示例8:
<?php
/**
* Businesslogic
*/
Box::add_extension('SlugableDataObject');
Member::add_extension('CloudMember');
示例9:
<?php
// Extentions
SiteConfig::add_extension('Ext_Commerce_SiteConfig');
Image::add_extension('Ext_Commerce_Image');
Controller::add_extension('Ext_Commerce_Controller');
Group::add_extension('Ext_Commerce_Group');
Member::add_extension('Ext_Commerce_Member');
if (class_exists('Users_Account_Controller')) {
Users_Account_Controller::add_extension('Ext_Commerce_UsersController');
}
// If subsites is installed
if (class_exists('Subsite')) {
Product::add_extension('Ext_Subsites_CommerceObject');
ProductCategory::add_extension('Ext_Subsites_CommerceObject');
Order::add_extension('Ext_Subsites_CommerceObject');
CatalogueAdmin::add_extension('SubsiteMenuExtension');
LocaliseAdmin::add_extension('SubsiteMenuExtension');
OrderAdmin::add_extension('SubsiteMenuExtension');
}
LeftAndMain::add_extension('Ext_Commerce_LeftAndMain');
// Setup google sitemaps
if (class_exists("GoogleSitemap")) {
GoogleSitemap::register_dataobject('Product');
GoogleSitemap::register_dataobject('ProductCategory');
}