API Set extension hook implementation visibility to protected

This commit is contained in:
Steve Boyd 2024-05-20 17:06:29 +12:00
parent fcd4ddc0b1
commit 1417d90b4e
7 changed files with 13 additions and 13 deletions

View File

@ -54,7 +54,7 @@ class UserFormFieldEditorExtension extends DataExtension
*
* @return FieldList
*/
public function updateCMSFields(FieldList $fields)
protected function updateCMSFields(FieldList $fields)
{
$fieldEditor = $this->getFieldEditorGrid();
@ -178,7 +178,7 @@ class UserFormFieldEditorExtension extends DataExtension
/**
* Ensure that at least one page exists at the start
*/
public function onAfterWrite()
protected function onAfterWrite()
{
$this->createInitialFormStep();
}
@ -186,7 +186,7 @@ class UserFormFieldEditorExtension extends DataExtension
/**
* Remove any orphaned child records on publish
*/
public function onAfterPublish()
protected function onAfterPublish()
{
// store IDs of fields we've published
$seenIDs = [];
@ -220,7 +220,7 @@ class UserFormFieldEditorExtension extends DataExtension
/**
* Remove all fields from the live stage when unpublishing the page
*/
public function onAfterUnpublish()
protected function onAfterUnpublish()
{
foreach ($this->owner->Fields() as $field) {
$field->deleteFromStage(Versioned::LIVE);
@ -236,7 +236,7 @@ class UserFormFieldEditorExtension extends DataExtension
* @param string $manyMany
* @return DataObject
*/
public function onAfterDuplicate($oldPage, $doWrite, $manyMany)
protected function onAfterDuplicate($oldPage, $doWrite, $manyMany)
{
// List of EditableFieldGroups, where the key of the array is the ID of the old end group
$fieldGroups = [];
@ -289,7 +289,7 @@ class UserFormFieldEditorExtension extends DataExtension
/**
* @see Versioned::doRevertToLive
*/
public function onAfterRevertToLive()
protected function onAfterRevertToLive()
{
foreach ($this->owner->Fields() as $field) {
$field->copyVersionToStage(Versioned::LIVE, Versioned::DRAFT);

View File

@ -44,7 +44,7 @@ class UserFormFileExtension extends DataExtension
* @param bool $value
* @see File::isTrackedFormUpload(), UserDefinedFormController::process()
*/
public function updateTrackedFormUpload(&$value): void
protected function updateTrackedFormUpload(&$value): void
{
$file = $this->owner;
if ($file->UserFormUpload != self::USER_FORM_UPLOAD_UNKNOWN) {

View File

@ -23,7 +23,7 @@ class UsedOnTableExtension extends Extension
* @param array $ancestorDataObjects
* @param DataObject $dataObject|null
*/
public function updateUsageDataObject(?DataObject &$dataObject)
protected function updateUsageDataObject(?DataObject &$dataObject)
{
if (!($dataObject instanceof SubmittedFileField)) {
return;
@ -41,7 +41,7 @@ class UsedOnTableExtension extends Extension
* @param array $ancestorDataObjects
* @param DataObject $dataObject
*/
public function updateUsageAncestorDataObjects(array &$ancestorDataObjects, DataObject $dataObject)
protected function updateUsageAncestorDataObjects(array &$ancestorDataObjects, DataObject $dataObject)
{
// SubmittedFileField was changed to a Submitted Form in updateUsageModifyOrExcludeDataObject()
if (!($dataObject instanceof SubmittedForm)) {

View File

@ -421,7 +421,7 @@ class EditableFormField extends DataObject
);
}
public function onBeforeWrite()
protected function onBeforeWrite()
{
parent::onBeforeWrite();

View File

@ -77,7 +77,7 @@ class EditableFieldGroupEnd extends EditableFormField
return false;
}
public function onAfterWrite()
protected function onAfterWrite()
{
parent::onAfterWrite();

View File

@ -275,7 +275,7 @@ class EditableFileField extends EditableFormField
return round(static::get_php_max_file_size() / 1024 / 1024, 1);
}
public function onBeforeWrite()
protected function onBeforeWrite()
{
parent::onBeforeWrite();

View File

@ -137,7 +137,7 @@ class EmailRecipient extends DataObject
DB::query("UPDATE \"UserDefinedForm_EmailRecipient\" SET \"FormClass\" = 'Page' WHERE \"FormClass\" IS NULL");
}
public function onBeforeWrite()
protected function onBeforeWrite()
{
parent::onBeforeWrite();