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


PHP Member::add_extension方法代码示例

本文整理汇总了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');
 }
开发者ID:notthatbad,项目名称:silverstripe-caching,代码行数:7,代码来源:CachedDataListTest.php

示例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;
 }
开发者ID:congaaids,项目名称:silverstripe-framework,代码行数:17,代码来源:MemberTest.php

示例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 =====================================
开发者ID:helpfulrobot,项目名称:sunnysideup-business-directory,代码行数:8,代码来源:_config.php

示例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');
}
开发者ID:helpfulrobot,项目名称:i-lateral-silverstripe-orders,代码行数:16,代码来源:_config.php

示例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');
}
开发者ID:helpfulrobot,项目名称:silverstripe-frameworktest,代码行数:22,代码来源:_config.php

示例6:

<?php

Member::add_extension('MemberDecorator');
开发者ID:helpfulrobot,项目名称:phuongle-silverstripe-member-registration,代码行数:3,代码来源:_config.php

示例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();
开发者ID:jaedb,项目名称:dev-tools,代码行数:30,代码来源:_config.php

示例8:

<?php

/**
 * Businesslogic
 */
Box::add_extension('SlugableDataObject');
Member::add_extension('CloudMember');
开发者ID:andrelohmann,项目名称:vagrant-cloud,代码行数:7,代码来源:_config.php

示例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');
}
开发者ID:helpfulrobot,项目名称:i-lateral-silverstripe-commerce,代码行数:26,代码来源:_config.php


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