MINOR: Use Deprecation class to indicated deprecated methods in cms.

This commit is contained in:
Sam Minnee 2011-10-29 12:02:32 +13:00
parent d63bcb63ae
commit 4e7cb308d5
3 changed files with 3 additions and 5 deletions

View File

@ -398,6 +398,7 @@ HTML;
* templates directly in the template.
*/
function LangAttributes() {
Deprecation::notice('2.5', 'Use ContentLocale() instead and write attribute names suitable to XHTML/HTML instead.');
$locale = $this->ContentLocale();
return "xml:lang=\"$locale\" lang=\"$locale\"";
}

View File

@ -2464,6 +2464,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @deprecated 3.0 Use getTreeTitle()
*/
function TreeTitle() {
Deprecation::notice('3.0', 'Use getTreeTitle() instead.');
return $this->getTreeTitle();
}

View File

@ -7,11 +7,7 @@
abstract class SiteTreeDecorator extends SiteTreeExtension {
public function __construct() {
// TODO Re-enable before we release 3.0 beta, for now it "breaks" too many modules
// user_error(
// 'SiteTreeDecorator is deprecated, please use SiteTreeExtension instead.',
// E_USER_NOTICE
// );
Deprecation::notice('3.0', 'Use SiteTreeExtension instead.');
parent::__construct();
}