Method: beforeRenderForm
This method is an optional callback that is called every time a CRUD component is about to render its form. It's therefore a perfect place to hook into the rendering process and inject our listener.
If the method is not available on a crud component rendered, that step is ignored. However, if that method exists, it will be called.
<?php
namespace Modules\YourModule\Settings;
use App\Classes\Hook;
use App\Classes\Output;
use App\Services\SettingsPage;
class YourModuleSettings extends SettingsPage
{
public function __construct()
{
// register your settings here
}
public function beforeRenderForm()
{
Hook::addAction( 'ns-dashboard-footer', function( Output $output ) {
$output->addView( 'YourModule::settings/footer' );
});
}
}