mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
Merge pull request #177 from creative-commoners/pulls/2/protect-hooks
API Set extension hook implementation visibility to protected
This commit is contained in:
commit
f87f2c202c
@ -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',
|
||||
|
@ -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'));
|
||||
|
@ -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');
|
||||
|
@ -34,7 +34,7 @@ class CompanyExtension extends Extension
|
||||
'ManyCompanyWebSiteLink',
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
protected function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
$fields->removeByName(['CompanyWebSiteLinkID', 'ManyCompanyWebSiteLinkID']);
|
||||
|
||||
|
@ -37,7 +37,7 @@ class ElementContentExtension extends Extension
|
||||
'ManyLinks',
|
||||
];
|
||||
|
||||
public function updateCMSFields($fields)
|
||||
protected function updateCMSFields($fields)
|
||||
{
|
||||
$fields->removeByName(['OneLinkID', 'ManyLinks']);
|
||||
$fields->addFieldsToTab(
|
||||
|
@ -36,7 +36,7 @@ class LinkPageExtension extends Extension
|
||||
'HasManyLinks',
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
protected function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
$fields->removeByName(['Content', 'HasOneLinkID', 'HasManyLinksID']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user