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


PHP LeftAndMain::add_extension方法代码示例

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


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

示例1: define

<?php

define('REACTJS_COMMON_PATH', 'reactjs-common');
LeftAndMain::add_extension('ReactJSCommonExtension');
开发者ID:unclecheese,项目名称:silverstripe-reactjs-common,代码行数:4,代码来源:_config.php

示例2:

<?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

示例3:

<?php

/**
 * The subsites module modifies the behaviour of the CMS - in the SiteTree and Group databases - to store information
 * about a number of sub-sites, rather than a single site.
 */
SiteTree::add_extension('SiteTreeSubsites');
ContentController::add_extension('ControllerSubsites');
CMSPageAddController::add_extension('CMSPageAddControllerExtension');
LeftAndMain::add_extension('LeftAndMainSubsites');
LeftAndMain::add_extension('ControllerSubsites');
Group::add_extension('GroupSubsites');
ErrorPage::add_extension('ErrorPageSubsite');
SiteConfig::add_extension('SiteConfigSubsites');
SS_Report::add_excluded_reports('SubsiteReportWrapper');
//Display in cms menu
SecurityAdmin::add_extension('SubsiteMenuExtension');
CMSMain::add_extension('SubsiteMenuExtension');
CMSPagesController::add_extension('SubsiteMenuExtension');
SubsiteAdmin::add_extension('SubsiteMenuExtension');
CMSSettingsController::add_extension('SubsiteMenuExtension');
CMSMenu::remove_menu_item('SubsiteXHRController');
开发者ID:mikenz,项目名称:silverstripe-simplesubsites,代码行数:22,代码来源:_config.php

示例4: str_replace

<?php

// Define path constant
$path = str_replace('\\', '/', __DIR__);
$path_fragments = explode('/', $path);
$dir_name = $path_fragments[count($path_fragments) - 1];
define('ABC_VENDOR_PATH', $dir_name . '/thirdparty');
define('ABC_PATH', $dir_name . '/src/abc');
// Configure Image Extension
AbcImageExtension::$fallback_image = ABC_PATH . '/images/no-image.jpg';
// attach Extensions
Image::add_extension('AbcImageExtension');
File::add_extension('AbcFileExtension');
LeftAndMain::add_extension('AbcLeftAndMainExtension');
SiteTree::add_extension('AbcSiteTreeExtension');
Security::add_extension('AbcSecurityExtension');
Controller::add_extension('AbcControllerExtension');
// DatePicker config
Object::useCustomClass('DateField_View_JQuery', 'jQueryUIDateField_View');
开发者ID:helpfulrobot,项目名称:azt3k-abc-silverstripe,代码行数:19,代码来源:_config.php


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