From 94a3113457ec661ac829856fd027aa8bda476a84 Mon Sep 17 00:00:00 2001 From: Ransom Date: Mon, 22 Jul 2019 10:06:11 -0400 Subject: [PATCH] Start field processor abstraction --- src/base/AbstractFieldProcessor.php | 39 +++++++++++ src/base/FieldProcessorInterface.php | 25 +++++++ src/fields/processors/PlainTextProcessor.php | 68 ++++++++++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 src/base/AbstractFieldProcessor.php create mode 100644 src/base/FieldProcessorInterface.php create mode 100644 src/fields/processors/PlainTextProcessor.php diff --git a/src/base/AbstractFieldProcessor.php b/src/base/AbstractFieldProcessor.php new file mode 100644 index 0000000..e63ba78 --- /dev/null +++ b/src/base/AbstractFieldProcessor.php @@ -0,0 +1,39 @@ +plugins->isPluginInstalled('redactor')) { + $fields[] = RedactorField::class; + } + + return $fields; + } + + /** + * Returns the supported strategies for this field type + * @return array + */ + public static function getSupportedStrategies(): array + { + return [BulkEdit::STRATEGY_REPLACE]; + } + + + public static function performReplacement(Element $element, Field $field, $value): void + { + + } +}