mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1813 from open-sausages/pulls/4.0/remove-deprecated-methods
Remove APIs with target deprecation of 4.0
This commit is contained in:
commit
1efb325b4d
@ -158,22 +158,4 @@ class ModelAsController extends Controller implements NestedController
|
|||||||
|
|
||||||
return self::controller_for($sitetree, $this->getRequest()->param('Action'));
|
return self::controller_for($sitetree, $this->getRequest()->param('Action'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated 4.0 Use OldPageRedirector::find_old_page instead
|
|
||||||
*
|
|
||||||
* @param string $URLSegment A subset of the url. i.e in /home/contact/ home and contact are URLSegment.
|
|
||||||
* @param int $parent The ID of the parent of the page the URLSegment belongs to.
|
|
||||||
* @param bool $ignoreNestedURLs
|
|
||||||
* @return SiteTree
|
|
||||||
*/
|
|
||||||
public static function find_old_page($URLSegment, $parent = null, $ignoreNestedURLs = false)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0', 'Use OldPageRedirector::find_old_page instead');
|
|
||||||
if ($parent) {
|
|
||||||
$parent = SiteTree::get()->byID($parent);
|
|
||||||
}
|
|
||||||
$url = OldPageRedirector::find_old_page(array($URLSegment), $parent);
|
|
||||||
return SiteTree::get_by_link($url);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -74,31 +74,6 @@ class RootURLController extends Controller implements Resettable
|
|||||||
return self::$cached_homepage_link;
|
return self::$cached_homepage_link;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the URL Segment used for your homepage when it is created by dev/build.
|
|
||||||
* This allows you to use home page URLs other than the default "home".
|
|
||||||
*
|
|
||||||
* @deprecated 4.0 Use the "RootURLController.default_homepage_link" config setting instead
|
|
||||||
* @param string $urlsegment the URL segment for your home page
|
|
||||||
*/
|
|
||||||
public static function set_default_homepage_link($urlsegment = "home")
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0', 'Use the "RootURLController.default_homepage_link" config setting instead');
|
|
||||||
Config::inst()->update('SilverStripe\\CMS\\Controllers\\RootURLController', 'default_homepage_link', $urlsegment);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the link that denotes the homepage if there is not one explicitly defined for this HTTP_HOST value.
|
|
||||||
*
|
|
||||||
* @deprecated 4.0 Use the "RootURLController.default_homepage_link" config setting instead
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public static function get_default_homepage_link()
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0', 'Use the "RootURLController.default_homepage_link" config setting instead');
|
|
||||||
return Config::inst()->get('SilverStripe\\CMS\\Controllers\\RootURLController', 'default_homepage_link');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns TRUE if a request to a certain page should be redirected to the site root (i.e. if the page acts as the
|
* Returns TRUE if a request to a certain page should be redirected to the site root (i.e. if the page acts as the
|
||||||
* home page).
|
* home page).
|
||||||
|
Loading…
Reference in New Issue
Block a user