mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
APICHANGE: add_extension() is now called directly on the class, instead of on Object
This commit is contained in:
parent
381ab72860
commit
1722f00869
@ -12,7 +12,7 @@ define('CMS_PATH', BASE_PATH . '/' . CMS_DIR);
|
|||||||
*/
|
*/
|
||||||
ShortcodeParser::get('default')->register('sitetree_link', array('SiteTree', 'link_shortcode_handler'));
|
ShortcodeParser::get('default')->register('sitetree_link', array('SiteTree', 'link_shortcode_handler'));
|
||||||
|
|
||||||
Object::add_extension('File', 'SiteTreeFileExtension');
|
File::add_extension('SiteTreeFileExtension');
|
||||||
|
|
||||||
// TODO Remove once we can configure CMSMenu through static, nested configuration files
|
// TODO Remove once we can configure CMSMenu through static, nested configuration files
|
||||||
CMSMenu::remove_menu_item('CMSMain');
|
CMSMenu::remove_menu_item('CMSMain');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Usage: Object::add_extension("SiteTree", "FilesystemPublisher('static-folder', 'html')");
|
* Usage: SiteTree::add_extension("FilesystemPublisher('static-folder', 'html')");
|
||||||
*
|
*
|
||||||
* Usage: To work with Subsite module you need to:
|
* Usage: To work with Subsite module you need to:
|
||||||
* - Add FilesystemPublisher::$domain_based_caching = true; in mysite/_config.php
|
* - Add FilesystemPublisher::$domain_based_caching = true; in mysite/_config.php
|
||||||
|
@ -54,8 +54,8 @@ class SiteTreeTest extends SapphireTest {
|
|||||||
static public function tear_down_once() {
|
static public function tear_down_once() {
|
||||||
if(class_exists('Translatable')) {
|
if(class_exists('Translatable')) {
|
||||||
if(self::$origTranslatableSettings['has_extension']) {
|
if(self::$origTranslatableSettings['has_extension']) {
|
||||||
Object::add_extension('SiteTree', 'Translatable');
|
SiteTree::add_extension('Translatable');
|
||||||
Object::add_extension('SiteConfig', 'Translatable');
|
SiteConfig::add_extension('Translatable');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class FilesystemPublisherTest extends SapphireTest {
|
|||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
Object::add_extension("SiteTree", "FilesystemPublisher('assets/FilesystemPublisherTest-static-folder/')");
|
SiteTree::add_extension("FilesystemPublisher('assets/FilesystemPublisherTest-static-folder/')");
|
||||||
|
|
||||||
$this->orig['domain_based_caching'] = FilesystemPublisher::$domain_based_caching;
|
$this->orig['domain_based_caching'] = FilesystemPublisher::$domain_based_caching;
|
||||||
FilesystemPublisher::$domain_based_caching = false;
|
FilesystemPublisher::$domain_based_caching = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user