API Update deprecations

This commit is contained in:
Steve Boyd 2022-11-16 11:57:49 +13:00
parent a356b0f8ce
commit 2a2b66a09b
2 changed files with 8 additions and 3 deletions

View File

@ -2,6 +2,7 @@
namespace SilverStripe\UserForms\Model;
use SilverStripe\Dev\Deprecation;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Controllers\CMSPageEditController;
use SilverStripe\Control\Controller;
@ -650,12 +651,13 @@ class EditableFormField extends DataObject
/**
* Returns the Title for rendering in the front-end (with XML values escaped)
*
* @deprecated 5.0..6.0 XML is automatically escaped in templates from SS 4 onwards. Please use $Title directly.
* @deprecated 4.12.0 Use $Title directly instead
*
* @return string
*/
public function getEscapedTitle()
{
Deprecation::notice('4.12.0', 'Use $Title directly instead');
return Convert::raw2xml($this->Title);
}
@ -945,10 +947,11 @@ class EditableFormField extends DataObject
* Determine effective display rules for this field.
*
* @return SS_List
* @deprecated 5.6 No longer needed because of support for conditional required field.
* @deprecated 5.6.0 Will be removed without equivalent functionality to replace it
*/
public function EffectiveDisplayRules()
{
Deprecation::notice('5.6.0', 'Will be removed without equivalent functionality to replace it');
if ($this->Required) {
return ArrayList::create();
}

View File

@ -2,6 +2,7 @@
namespace SilverStripe\UserForms\Model\EditableFormField;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Core\Convert;
use SilverStripe\ORM\DataObject;
use SilverStripe\Security\Member;
@ -70,11 +71,12 @@ class EditableOption extends DataObject
}
/**
* @deprecated 5.0..6.0 Use "$Title" in templates instead
* @deprecated 5.0.0 Use $Title in templates instead
* @return string
*/
public function getEscapedTitle()
{
Deprecation::notice('5.0.0', 'Use $Title in templates instead');
return Convert::raw2xml($this->Title);
}