Skip to content

Commit

Permalink
Merge pull request #4 from markhuot/patch-1
Browse files Browse the repository at this point in the history
Update ForeignField to support outside behaviors
  • Loading branch information
sebastian-lenz authored Feb 13, 2023
2 parents 8640343 + f4729d9 commit 42071b9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/foreignField/ForeignField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 42071b9

Please sign in to comment.