-
Notifications
You must be signed in to change notification settings - Fork 684
[6.x] Settings Index page #18183
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
base: feature/cms-1677-refactor-t-function
Are you sure you want to change the base?
[6.x] Settings Index page #18183
Conversation
…ftcms/cms into feature/inertia-settings-index
…ftcms/cms into feature/inertia-settings-index
src/Cp/Settings.php
Outdated
| // @TODO ask Rias for help with this | ||
| // // Fire a 'registerCpSettings' event | ||
| // $eventName = $readOnly ? self::EVENT_REGISTER_READ_ONLY_CP_SETTINGS : self::EVENT_REGISTER_CP_SETTINGS; | ||
| // if ($this->hasEventHandlers($eventName)) { | ||
| // $event = new RegisterCpSettingsEvent(['settings' => $settings]); | ||
| // $this->trigger($eventName, $event); | ||
| // | ||
| // return $event->settings; | ||
| // } |
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.
@riasvdv Can you remind me how I should be implementing events so both Yii and Laravel events work properly? Or maybe just point me towards an example?
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.
-
Create new events RegisterReadonlyCpSettings and RegisterCpSettings
-
Add a static
registerEvents()to the legacy class that used to dispatch them, where it listens for the new event and dispatches that in the Yii way. -
Add a call to that static method in the service provider of the adapter
Targeting the
refactor-t-functionbranch just for a cleaner diff.Moves the main settings page into inertia. The main change here is setting up at least a first pass of our icon library to use with the
craft-iconcomponent (which is just a wrapper aroundwa-icon).Warning
I updated where assets are published which may break things for you.
Previously we published the
resources/buildfolder topublic/vendor/craftbut now that we're also publishing icons, those have been moved topublic/vendor/craft/build. Icons will end up inpublic/vendor/craft/icons.I know at least @riasvdv and I have symlinks set up that links
public/vendor/crafttoresources/build. With this PR you'll need to update that. In my case I just symlinked the entireresourcesdirectory.