API Set extension hook implementation visibility to protected

This commit is contained in:
Steve Boyd 2024-05-16 17:30:44 +12:00
parent 248899294a
commit 62d9fbcd5a
6 changed files with 7 additions and 7 deletions

View File

@ -16,7 +16,7 @@ class FrameworkTestRole extends DataExtension
'FavouritePage' => 'SilverStripe\\CMS\\Model\\SiteTree',
);
public function updateCMSFields(FieldList $fields)
protected function updateCMSFields(FieldList $fields)
{
$fields->addFieldToTab(
'Root.Main',

View File

@ -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']));
}
public function updateCMSFields(FieldList $fields)
protected function updateCMSFields(FieldList $fields)
{
$fields->removeByName('HTML');
$fields->addFieldToTab('Root.Main', TextField::create('MyField', 'My Field'));

View File

@ -10,7 +10,7 @@ use SilverStripe\Core\Extension;
*/
class NumericFieldExtension extends Extension
{
public function updateValidationResult($result, $validator)
protected function updateValidationResult($result, $validator)
{
if ($this->owner->Value() == 1) {
$validator->validationError($this->owner->getName(), 'This field cannot be 1');

View File

@ -34,7 +34,7 @@ class CompanyExtension extends Extension
'ManyCompanyWebSiteLink',
];
public function updateCMSFields(FieldList $fields)
protected function updateCMSFields(FieldList $fields)
{
$fields->removeByName(['CompanyWebSiteLinkID', 'ManyCompanyWebSiteLinkID']);

View File

@ -37,7 +37,7 @@ class ElementContentExtension extends Extension
'ManyLinks',
];
public function updateCMSFields($fields)
protected function updateCMSFields($fields)
{
$fields->removeByName(['OneLinkID', 'ManyLinks']);
$fields->addFieldsToTab(

View File

@ -36,7 +36,7 @@ class LinkPageExtension extends Extension
'HasManyLinks',
];
public function updateCMSFields(FieldList $fields)
protected function updateCMSFields(FieldList $fields)
{
$fields->removeByName(['Content', 'HasOneLinkID', 'HasManyLinksID']);