Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

APICHANGE: add_extension() is now called directly on the class, inste…

…ad of on Object
  • Loading branch information...
commit 1722f00869d2ab72d49ff70318b72b766041abb3 1 parent 381ab72
@ajoneil ajoneil authored halkyon committed
View
2  _config.php
@@ -12,7 +12,7 @@
*/
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
2  code/staticpublisher/FilesystemPublisher.php
@@ -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
4 tests/model/SiteTreeTest.php
@@ -54,8 +54,8 @@ static public function set_up_once() {
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
2  tests/staticpublisher/FilesystemPublisherTest.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.