From f4729d9663fc0ddd9c32eb30e5024bfcee00fe2a Mon Sep 17 00:00:00 2001 From: Mark Huot Date: Mon, 30 Jan 2023 14:05:51 -0500 Subject: [PATCH] Update ForeignField to support outside behaviors --- src/foreignField/ForeignField.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/foreignField/ForeignField.php b/src/foreignField/ForeignField.php index 30cd556..2f9b0fc 100644 --- a/src/foreignField/ForeignField.php +++ b/src/foreignField/ForeignField.php @@ -53,11 +53,13 @@ public function afterElementSave(ElementInterface $element, bool $isNew): void { * @inheritDoc */ public function behaviors(): array { - return [ - 'typecast' => [ - 'class' => AttributeTypecastBehavior::class, - ], + $behaviors = parent::behaviors(); + + $behaviors['typecast'] = [ + 'class' => AttributeTypecastBehavior::class, ]; + + return $behaviors; } /**