mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
API Set extension hook implementation visibility to protected
This commit is contained in:
parent
248899294a
commit
62d9fbcd5a
@ -16,7 +16,7 @@ class FrameworkTestRole extends DataExtension
|
|||||||
'FavouritePage' => 'SilverStripe\\CMS\\Model\\SiteTree',
|
'FavouritePage' => 'SilverStripe\\CMS\\Model\\SiteTree',
|
||||||
);
|
);
|
||||||
|
|
||||||
public function updateCMSFields(FieldList $fields)
|
protected function updateCMSFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
$fields->addFieldToTab(
|
$fields->addFieldToTab(
|
||||||
'Root.Main',
|
'Root.Main',
|
||||||
|
@ -40,12 +40,12 @@ class ElementContentExtension extends Extension
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateCMSCompositeValidator(CompositeValidator $compositeValidator)
|
protected function updateCMSCompositeValidator(CompositeValidator $compositeValidator)
|
||||||
{
|
{
|
||||||
$compositeValidator->addValidator(new RequiredFields(['Title', 'MyPageID', 'MyFile']));
|
$compositeValidator->addValidator(new RequiredFields(['Title', 'MyPageID', 'MyFile']));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateCMSFields(FieldList $fields)
|
protected function updateCMSFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
$fields->removeByName('HTML');
|
$fields->removeByName('HTML');
|
||||||
$fields->addFieldToTab('Root.Main', TextField::create('MyField', 'My Field'));
|
$fields->addFieldToTab('Root.Main', TextField::create('MyField', 'My Field'));
|
||||||
|
@ -10,7 +10,7 @@ use SilverStripe\Core\Extension;
|
|||||||
*/
|
*/
|
||||||
class NumericFieldExtension extends Extension
|
class NumericFieldExtension extends Extension
|
||||||
{
|
{
|
||||||
public function updateValidationResult($result, $validator)
|
protected function updateValidationResult($result, $validator)
|
||||||
{
|
{
|
||||||
if ($this->owner->Value() == 1) {
|
if ($this->owner->Value() == 1) {
|
||||||
$validator->validationError($this->owner->getName(), 'This field cannot be 1');
|
$validator->validationError($this->owner->getName(), 'This field cannot be 1');
|
||||||
|
@ -34,7 +34,7 @@ class CompanyExtension extends Extension
|
|||||||
'ManyCompanyWebSiteLink',
|
'ManyCompanyWebSiteLink',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function updateCMSFields(FieldList $fields)
|
protected function updateCMSFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
$fields->removeByName(['CompanyWebSiteLinkID', 'ManyCompanyWebSiteLinkID']);
|
$fields->removeByName(['CompanyWebSiteLinkID', 'ManyCompanyWebSiteLinkID']);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class ElementContentExtension extends Extension
|
|||||||
'ManyLinks',
|
'ManyLinks',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function updateCMSFields($fields)
|
protected function updateCMSFields($fields)
|
||||||
{
|
{
|
||||||
$fields->removeByName(['OneLinkID', 'ManyLinks']);
|
$fields->removeByName(['OneLinkID', 'ManyLinks']);
|
||||||
$fields->addFieldsToTab(
|
$fields->addFieldsToTab(
|
||||||
|
@ -36,7 +36,7 @@ class LinkPageExtension extends Extension
|
|||||||
'HasManyLinks',
|
'HasManyLinks',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function updateCMSFields(FieldList $fields)
|
protected function updateCMSFields(FieldList $fields)
|
||||||
{
|
{
|
||||||
$fields->removeByName(['Content', 'HasOneLinkID', 'HasManyLinksID']);
|
$fields->removeByName(['Content', 'HasOneLinkID', 'HasManyLinksID']);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user