APICHANGE: add_extension() is now called directly on the class, instead of on Object

This commit is contained in:
Andrew O'Neil 2012-10-09 16:56:57 +13:00 committed by Sean Harvey
parent 381ab72860
commit 1722f00869
4 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ define('CMS_PATH', BASE_PATH . '/' . CMS_DIR);
*/
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
CMSMenu::remove_menu_item('CMSMain');

View File

@ -1,7 +1,7 @@
<?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:
* - Add FilesystemPublisher::$domain_based_caching = true; in mysite/_config.php

View File

@ -54,8 +54,8 @@ class SiteTreeTest extends SapphireTest {
static public function tear_down_once() {
if(class_exists('Translatable')) {
if(self::$origTranslatableSettings['has_extension']) {
Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable');
SiteTree::add_extension('Translatable');
SiteConfig::add_extension('Translatable');
}

View File

@ -14,7 +14,7 @@ class FilesystemPublisherTest extends SapphireTest {
public function 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;
FilesystemPublisher::$domain_based_caching = false;