-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC Document new FormSchemaController #628
Merged
emteknetnz
merged 1 commit into
silverstripe:6
from
creative-commoners:pulls/6/formschema
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,7 +205,7 @@ The way these are displayed in the new `sake tasks` list doesn't suit long names | |
|
||
For example, you used to navigate to `/dev/tasks/<OLD_NAME>` or use `sake dev/tasks/<OLD_NAME>`. Now you will need to navigate to `/dev/tasks/<NEW_NAME>` or use `sake tasks:<NEW_NAME>`. | ||
|
||
|class|old name|new name| | ||
|Class|Old name|New name| | ||
|---|---|---| | ||
|[`ContentReviewEmails`](api:SilverStripe\ContentReview\Tasks\ContentReviewEmails)|`SilverStripe-ContentReview-Tasks-ContentReviewEmails`|`content-review-emails`| | ||
|[`DeleteAllJobsTask`](api:Symbiote\QueuedJobs\Tasks\DeleteAllJobsTask)|`Symbiote-QueuedJobs-Tasks-DeleteAllJobsTask`|`delete-queued-jobs`| | ||
|
@@ -580,7 +580,7 @@ Some API which used to be on `SSViewer` is now on `SSTemplateEngine`, and some h | |
|
||
Along with those API changes, the following classes and interfaces were moved into the new module: | ||
|
||
|old class|new class| | ||
|Old class|New class| | ||
|---|---| | ||
|`SilverStripe\View\SSViewer_BasicIteratorSupport`|[`SilverStripe\TemplateEngine\BasicIteratorSupport`](api:SilverStripe\TemplateEngine\BasicIteratorSupport)| | ||
|`SilverStripe\View\SSTemplateParseException`|[`SilverStripe\TemplateEngine\Exception\SSTemplateParseException`](api:SilverStripe\TemplateEngine\Exception\SSTemplateParseException)| | ||
|
@@ -606,14 +606,25 @@ See the [full list of removed and changed API](#api-removed-and-changed) to see | |
|
||
### Changes to `LeftAndMain` and its subclasses {#leftandmain-refactor} | ||
|
||
[`LeftAndMain`](api:SilverStripe\Admin\LeftAndMain) has historically been the superclass for all controllers routed in `/admin/*` (i.e. all controllers used in the CMS). That class includes a lot of boilerplate functionality for setting up a menu, edit form, etc which a lot of controllers don't need. | ||
[`LeftAndMain`](api:SilverStripe\Admin\LeftAndMain) has historically been the superclass for all controllers routed in `/admin/*` (i.e. all controllers used in the CMS). It's also the superclass for admin-routed controllers which manage modal forms. That class includes a lot of boilerplate functionality for setting up a menu, edit form, etc which a lot of controllers don't need. | ||
|
||
A new [`AdminController`](api:SilverStripe\Admin\AdminController) has been created which provides the `/admin/*` routing functionality and permission checks that `LeftAndMain` used to be responsible for. If you have a controller which needs to be routed through `/admin/*` with the relevant CMS permission checks, but which does *not* need a menu item on the left or an edit form, you should update that class to be a subclass of `AdminController` instead. | ||
|
||
As a result of this change, to following classes are now direct subclasses of `AdminController`: | ||
The new [`FormSchemaController`](api:SilverStripe\Admin\FormSchemaController) class (which is a subclass of `AdminController`) now owns the logic required for injecting and managing forms inside modals. | ||
|
||
- [`SudoModeController`](api:SilverStripe\Admin\SudoModeController) - used to be a subclass of `LeftAndMain`. | ||
- [`CMSExternalLinksController`](api:SilverStripe\ExternalLinks\Controllers\CMSExternalLinksController) - used to be a direct subclass of [`Controller`](api:SilverStripe\Control\Controller). | ||
As a result of these changes, the following classes have had their class hierarchy updated: | ||
|
||
|Class|Old superclass|New superclass| | ||
|---|---|---| | ||
|[`LeftAndMain`](api:SilverStripe\Admin\LeftAndMain)|[`Controller`](api:SilverStripe\Control\Controller)|`FormSchemaController`| | ||
|[`SudoModeController`](api:SilverStripe\Admin\SudoModeController)|`LeftAndMain`|`AdminController`| | ||
|[`ElementalAreaController`](api:DNADesign\Elemental\Controllers\ElementalAreaController)|[`CMSMain`](api:SilverStripe\CMS\Controllers\CMSMain)|`FormSchemaController`| | ||
|[`HistoryViewerController`](api:SilverStripe\VersionedAdmin\Controllers\HistoryViewerController)|`LeftAndMain`|`FormSchemaController`| | ||
|[`UserDefinedFormAdmin`](api:SilverStripe\UserForms\Control\UserDefinedFormAdmin)|`LeftAndMain`|`FormSchemaController`| | ||
|[`AdminRegistrationController`](api:SilverStripe\MFA\Controller\AdminRegistrationController)|`LeftAndMain`|`AdminController`| | ||
|[`LinkFieldController`](api:SilverStripe\LinkField\Controllers\LinkFieldController)|`LeftAndMain`|`FormSchemaController`| | ||
|[`SubsiteXHRController`](api:SilverStripe\Subsites\Controller\SubsiteXHRController)|`LeftAndMain`|`AdminController`| | ||
|[`CMSExternalLinksController`](api:SilverStripe\ExternalLinks\Controllers\CMSExternalLinksController)|`Controller`|`AdminController`| | ||
|
||
The `tree_class` configuration property on `LeftAndMain` and its subclasses has be renamed to [`model_class`](api:SilverStripe\Admin\LeftAndMain->model_class). This is used in methods like [`getRecord()`](api:SilverStripe\Admin\LeftAndMain::getRecord()) to get a record of the correct class. | ||
|
||
|
@@ -780,7 +791,8 @@ Note that the change from `ViewableData` to `ModelData` specifically was made to | |
|
||
### GraphQL removed from the CMS {#graphql-removed} | ||
|
||
> [!INFO] If you need to use GraphQL in your project for public-facing frontend schemas, you can still install and use the [`silverstripe/graphql`](https://github.com/silverstripe/silverstripe-graphql) module. | ||
> [!NOTE] | ||
> If you need to use GraphQL in your project for public-facing frontend schemas, you can still install and use the [`silverstripe/graphql`](https://github.com/silverstripe/silverstripe-graphql) module. | ||
Comment on lines
-783
to
+795
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated - wasn't rendering correctly. |
||
|
||
GraphQL has been removed from the admin section of the CMS and is no longer installed when creating a new project using [`silverstripe/installer`](https://github.com/silverstripe/silverstripe-installer), or an existing project that uses [`silverstripe/recipe-cms`](https://github.com/silverstripe/recipe-cms). All existing functionality in the CMS that previously relied on GraphQL has been migrated to use regular Silverstripe CMS controllers instead. | ||
|
||
|
@@ -798,7 +810,7 @@ Core implementations of most extension hooks such as `updateCMSFields()` now hav | |
|
||
In order to better align the codebase in Silverstripe CMS with best practices, the following extension hook methods have changed name: | ||
|
||
|class that defined the hook|old name|new name| | ||
|Class that defined the hook|Old name|New name| | ||
|---|---|---| | ||
|[`Member`](api:SilverStripe\Security\Member)|`afterMemberLoggedIn`|`onAfterMemberLoggedIn`| | ||
|[`Member`](api:SilverStripe\Security\Member)|`afterMemberLoggedOut`|`onAfterMemberLoggedOut`| | ||
|
@@ -851,7 +863,7 @@ Injector::inst()->load([ | |
|
||
The class names for the `TopPage` feature in [`dnadesign/silverstripe-elemental`](https://github.com/silverstripe/silverstripe-elemental) did not follow the correct naming convention for Silverstripe CMS. The class names have been changed as follows: | ||
|
||
|old name|new name| | ||
|Old name|New name| | ||
|---|---| | ||
|`DNADesign\Elemental\TopPage\DataExtension`|`DNADesign\Elemental\Extensions\TopPageElementExtension`| | ||
|`DNADesign\Elemental\TopPage\FluentExtension`|`DNADesign\Elemental\Extensions\TopPageElementFluentExtension`| | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated change - link should be an API link