You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extend/routes.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,10 +143,6 @@ class HelloWorldController implements RequestHandlerInterface
143
143
}
144
144
```
145
145
146
-
### API Controllers
147
-
148
-
The `Flarum\Api\Controller` namespace contains a number of abstract controller classes that you can extend to easily implement new JSON-API resources. See [Working with Data](api.md) for more information.
149
-
150
146
## Frontend Routes
151
147
152
148
Adding routes to the frontend actually requires you to register them on _both_ the frontend and the backend. This is because when your route is visited, the backend needs to know to serve up the frontend, and the frontend needs to know what to display on the page.
Copy file name to clipboardExpand all lines: docs/extend/update-2_0.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,10 +61,16 @@ Familiarize yourself with the new [Code Splitting](./code-splitting) feature to
61
61
62
62
:::
63
63
64
-
### Admin Search
64
+
### Forum Search
65
65
66
66
##### <spanclass="breaking">Breaking</span>
67
-
*`app.extensionData` has been renamed to `app.registry`, but you should now use the [`Admin` extender](./admin.md) instead.
67
+
* The forum search UI has been refactored to use a new `SearchModal` component.
68
+
* The `flarum/forum/components/Search` component is no longer the global search component, it can still be used for custom search purposes.
69
+
* Custom global search sources should be registered in `flarum/forum/components/GlobalSearch``sourceItems` method.
70
+
* Custom global search sources should now implement the `GlobalSearchSource` interface instead of `SearchSource`, see https://github.com/flarum/framework/blob/2.x/framework/core/js/src/common/components/AbstractSearch.tsx#L26-L69.
71
+
* The `flarum/forum/states/SearchState` class has been moved to `flarum/common/states/SearchState`.
72
+
73
+
### Admin Search
68
74
69
75
##### <spanclass="notable">Notable</span>
70
76
* The admin dashboard now has a search feature, as long as you register your settings/permissions using the `Admin` extender, then they will be automatically picked up.
@@ -97,6 +103,7 @@ Familiarize yourself with the new [Code Splitting](./code-splitting) feature to
97
103
There have been many changes to the core frontend codebase, including renamed or moved methods/components, new methods/components, and more. It might help to look directly at the [JavaScript diffs](https://github.com/flarum/framework/issues?q=is%3Amerged+label%3Ajavascript+milestone%3A2.0+) to see what has changed. But here are some notable changes.
98
104
99
105
##### <spanclass="breaking">Breaking</span>
106
+
*`app.extensionData` has been renamed to `app.registry`, but you should now use the [`Admin` extender](./admin.md) instead.
100
107
* Some extension initializers [have been renamed to be more uniform](https://github.com/flarum/framework/pull/4003/files), if you are checking for initializer existence with `app.initializers.has('...')` you should update the name accordingly.
101
108
*`IndexPage.prototype.sidebar` has been removed, use the `IndexSidebar` component instead.
102
109
*`IndexPage.prototype.navItems` has been moved to `IndexSidebar.prototype.navItems`.
0 commit comments