mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #1176 from creative-commoners/pulls/5/depr-messages
API Update deprecations
This commit is contained in:
commit
f3f23351a7
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user