cms.theme.registerHalcyonDatasource

Fires immediately after the theme's Datasource has been registered.

Allows for extension of the theme Halcyon Datasource, example usage:

use Cms\Classes\Theme; use Winter\Storm\Halcyon\Datasource\Resolver;

Event::listen('cms.theme.registerHalcyonDatasource', function (Theme $theme, Resolver $resolver) { $resolver->addDatasource($theme->getDirName(), new AutoDatasource([ 'theme' => $theme->getDatasource(), 'example' => new ExampleDatasource(), ], 'example-autodatasource')); });

Usage

Triggers

Class or file Line
Cms\Classes\Theme 667
Copyright © 2024 Winter CMS