Merge pull request #11245 from creative-commoners/pulls/6/protect-hooks

API Set extension hook implementation visibility to protected
This commit is contained in:
Guy Sartorelli 2024-05-17 10:28:33 +12:00 committed by GitHub
commit 5ccd361426
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 11 deletions

View File

@ -26,7 +26,7 @@ use SilverStripe\ORM\ValidationResult;
*
* Or by implementing the updateCMSCompositeValidator() method in a DataExtension:
*
* public function updateCMSCompositeValidator(CompositeValidator $compositeValidator): void
* protected function updateCMSCompositeValidator(CompositeValidator $compositeValidator): void
* {
* $compositeValidator->addValidator(RequiredFields::create(['AdditionalContent']));
* }

View File

@ -35,7 +35,7 @@ abstract class DataExtension extends Extension
* @param SQLSelect $query Query to augment.
* @param DataQuery $dataQuery Container DataQuery for this SQLSelect
*/
public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null)
protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null)
{
}
@ -45,7 +45,7 @@ abstract class DataExtension extends Extension
* When duplicating a table's structure, remember to duplicate the create options
* as well. See {@link Versioned->augmentDatabase} for an example.
*/
public function augmentDatabase()
protected function augmentDatabase()
{
}
@ -54,7 +54,7 @@ abstract class DataExtension extends Extension
*
* @param array $manipulation Array of operations to augment.
*/
public function augmentWrite(&$manipulation)
protected function augmentWrite(&$manipulation)
{
}
@ -206,7 +206,7 @@ abstract class DataExtension extends Extension
*
* @param FieldList $fields FieldList with a contained TabSet
*/
public function updateCMSFields(FieldList $fields)
protected function updateCMSFields(FieldList $fields)
{
}
@ -217,7 +217,7 @@ abstract class DataExtension extends Extension
*
* @param CompositeValidator $compositeValidator
*/
public function updateCMSCompositeValidator(CompositeValidator $compositeValidator): void
protected function updateCMSCompositeValidator(CompositeValidator $compositeValidator): void
{
}
@ -229,7 +229,7 @@ abstract class DataExtension extends Extension
*
* @param FieldList $fields FieldList without TabSet nesting
*/
public function updateFrontEndFields(FieldList $fields)
protected function updateFrontEndFields(FieldList $fields)
{
}
@ -239,7 +239,7 @@ abstract class DataExtension extends Extension
*
* @param FieldList $actions FieldList
*/
public function updateCMSActions(FieldList $actions)
protected function updateCMSActions(FieldList $actions)
{
}
@ -251,7 +251,7 @@ abstract class DataExtension extends Extension
*
* @param array $fields Array of field names
*/
public function updateSummaryFields(&$fields)
protected function updateSummaryFields(&$fields)
{
$summary_fields = Config::inst()->get(static::class, 'summary_fields');
if ($summary_fields) {
@ -274,7 +274,7 @@ abstract class DataExtension extends Extension
*
* @param array $labels Array of field labels
*/
public function updateFieldLabels(&$labels)
protected function updateFieldLabels(&$labels)
{
$field_labels = Config::inst()->get(static::class, 'field_labels');
if ($field_labels) {

View File

@ -4476,7 +4476,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* The framework extend method will return combined values from DataExtension method(s) as an array
* The method on your DataExtension class should return a single scalar value. For example:
*
* public function cacheKeyComponent()
* protected function cacheKeyComponent()
* {
* return (string) $this->owner->MyColumn;
* }