Contents

Backend\Widgets\SiteSwitcher

Overview

SiteSwitcher widget.

Extends
Implements
  • Larajax\Contracts\ViewComponentInterface

Public Properties

There are no public properties in the class.

Show inherited public properties

Inherited Public Properties

Protected Properties

protected string $defaultAlias

defaultAlias to identify this widget.

protected string|null $switchHandler

switchHandler is set by setSwitchHandler.

Show inherited protected properties

Inherited Protected Properties


Public Methods

public bindToController()

public bindToController(): void

public prepareVars()

public prepareVars($extraVars = []): void

prepareVars for display

public render()

public render($extraVars = []): void

render the widget's primary contents.

public renderSubmenu()

public renderSubmenu(): void

public setSwitchHandler()

public setSwitchHandler($name = null): void

setSwitchHandler enables the use of an AJAX handler when switching the site

Show inherited public methods

Inherited Public Methods

Protected Methods

protected filterSitesByPlugin()

protected filterSitesByPlugin($sites): void

filterSitesByPlugin removes sites where the current controller's plugin is disabled, returns the collection unchanged for module controllers.

protected loadAssets()

protected loadAssets(): void 

loadAssets adds widget specific asset files. Use $this->addJs() and $this->addCss() to register new assets to include on the page.

Show inherited protected methods

Inherited Protected Methods