From 170817cafb5b40d196e385139a2491b41108eaed Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Wed, 7 Feb 2024 23:01:43 -0800 Subject: [PATCH] 4.0.0-beta.3 - fixes #157 --- CHANGELOG.md | 4 ++++ src/Field.php | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c72f1a..16994af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes for CKEditor for Craft CMS +## 4.0.0-beta.3 - 2024-02-07 + +- Fixed a bug where it was possible to change nested entries to types that the field wasn’t configured with. ([#157](https://github.com/craftcms/ckeditor/issues/157)) + ## 4.0.0-beta.2 - 2024-02-07 - Fixed a SQL error that occurred when creating a nested entry on PostgreSQL. diff --git a/src/Field.php b/src/Field.php index 56ed4ea..f140672 100644 --- a/src/Field.php +++ b/src/Field.php @@ -289,14 +289,6 @@ public function settingsAttributes(): array return $attributes; } - /** - * @inheritdoc - */ - public function getFieldLayoutProviders(): array - { - return Craft::$app->getEntries()->getAllEntryTypes(); - } - /** * @inheritdoc */ @@ -442,6 +434,14 @@ public function setEntryTypes(array $entryTypes): void }, $entryTypes))); } + /** + * @inheritdoc + */ + public function getFieldLayoutProviders(): array + { + return $this->getEntryTypes(); + } + /** * @inheritdoc */