Index

CMS index

 class Cms\Controllers\Index
extends Backend\Classes\Controller

Extends

Class Description
Controller

The Backend base controller class, used by Backend controllers.

Traits

Trait Description
AssetMaker

Asset Maker Trait Adds asset based methods to a class

ConfigMaker

Config Maker Trait Adds configuration based methods to a class

ErrorMaker

Error Maker Trait Adds exception based methods to a class, goes well with System\Traits\ViewMaker.

EventEmitter

Adds system event related features to any class.

ExtendableTrait

This extension trait is used when access to the underlying base class is not available, such as classes that belong to the foundation framework (Laravel). It is currently used by the Controller and Model classes.

InspectableContainer

Inspectable Container Trait Extension for controllers that can host inspectable widgets (Components, etc.)

ResponseMaker

Response Maker Trait Stores attributes the can be used to prepare a response from the server.

SecurityController

Security Controller Trait Adds cross-site scripting protection methods to a controller based class

ViewMaker

View Maker Trait Adds view based methods to a class

WidgetMaker

Widget Maker Trait

Properties

public $requiredPermissions : array

Permissions required to view this page.

protected $theme : Cms\Classes\Theme

inherited public $assetPath : string

Inherited from Controller

Specifies a path to the asset directory.

inherited public $bodyClass : string

Inherited from Controller

Body class property used for customising the layout on a controller basis.

inherited public $hiddenActions : array

Inherited from Controller

Default methods which cannot be called as actions.

inherited public $implement : array

Inherited from Controller

Behaviors implemented by this controller.

inherited public $layout : string

Inherited from Controller

Layout to use for the view.

inherited public $pageTitle : string

Inherited from Controller

Page title

inherited public $pageTitleTemplate : string

Inherited from Controller

Page title template

inherited public $suppressLayout : bool

Inherited from Controller

Prevents the use of a layout.

inherited public $suppressView : bool

Inherited from Controller

Prevents the automatic view display.

inherited public $vars : array

Inherited from Controller

A list of variables to pass to the page.

inherited public $widget : array

Inherited from Controller

Collection of WidgetBase objects used on this page.

inherited protected $action : string

Inherited from Controller

Page action being called.

inherited protected $assets : array

Inherited from Controller

Collection of assets to display in the layout.

inherited protected $configPath : string

Inherited from Controller

Specifies a path to the config directory.

inherited protected static $extendableCallbacks : array

Inherited from Controller

Used to extend the constructor of an extendable class. Eg:

Class::extend(function($obj) { })

inherited protected static $extendableClassLoader : ClassLoader | null

Inherited from Controller

Class loader instance.

inherited protected static $extendableStaticMethods : array

Inherited from Controller

Collection of static methods used by behaviors.

inherited protected $extensionData : array

Inherited from Controller

Class reflection information, including behaviors.

inherited protected $fatalError : string

Inherited from Controller

Object used for storing a fatal error.

inherited protected $guarded : array

Inherited from Controller

Controller specified methods which cannot be called as actions.

inherited protected $layoutPath : string

Inherited from Controller

Specifies a path to the layout directory.

inherited protected $orderFactor : integer

Inherited from Controller

Ensures "first-come, first-served" applies to assets of the same ordering.

inherited protected $params : array

Inherited from Controller

Routed parameters.

inherited protected $publicActions : array

Inherited from Controller

Defines a collection of actions available without authentication.

inherited protected $responseHeaderBag : Symfony\Component\HttpFoundation\ResponseHeaderBag

Inherited from Controller

inherited protected $responseOverride : mixed

Inherited from Controller

Override the standard controller response.

inherited protected $statusCode : int

Inherited from Controller

Response status code

inherited protected $user : object

Inherited from Controller

Reference the logged in admin user.

inherited protected $viewPath : string | array

Inherited from Controller

Specifies a path to the views directory.

Methods

public __construct ()

Constructor.

Returns
mixed

public index () : void

Index page action

Returns
void

public index_onOpenTemplate () : array

Opens an existing template from the index page

Returns
array

public onCommit () : array

Commits the DB changes of a template to the filesystem

Returns
array

$response

public onCreateTemplate () : array

Create a new template

Returns
array

public onDelete () : void

Deletes a template

Returns
void

public onDeleteTemplates () : array

Deletes multiple templates at the same time

Returns
array

public onExpandMarkupToken () : array

Remembers an open or closed state for a supplied token, for example, component folders.

Returns
array

public onGetTemplateList () : array

Returns list of available templates

Returns
array

public onOpenConcurrencyResolveForm () : string

Displays a form that suggests the template has been edited elsewhere

Returns
string

public onReset () : array

Resets a template to the version on the filesystem

Returns
array

$response

public onSave () : array

Saves the template currently open

Returns
array

protected bindFormWidgetToController () : void

Binds the active form widget to the controller

Returns
void

protected canCommitTemplate (CmsObject $template) : bool

Check to see if the provided template can be committed Only available in debug mode, the DB layer must be enabled, and the template must exist in the database

Parameters
Property Description
$template
Returns
bool

protected canResetTemplate (CmsObject $template) : bool

Check to see if the provided template can be reset Only available when the DB layer is enabled and the template exists in both the DB & Filesystem

Parameters
Property Description
$template
Returns
bool

protected convertLineEndings (string $markup) : string

Replaces Windows style (/r/n) line endings with unix style (/n) line endings.

Parameters
Property Description
$markup
string

The markup to convert to unix style endings

Returns
string

protected createTemplate (string $type) : mixed

Creates a new template of a given type

Parameters
Property Description
$type
string
Returns
mixed

protected findComponentByAlias (string $aliasQuery, array $components = []) : array | null

Finds a given component by its alias.

If found, this will return the component's name, alias and properties.

Parameters
Property Description
$aliasQuery
string

The alias to search for

$components
array

The array of components to look within.

Returns
array | null

protected getTabTitle (string $type, string $template) : string

Returns the text for a template tab

Parameters
Property Description
$type
string
$template
string
Returns
string

protected getThemeDatasource () : Winter\Storm\Halcyon\Datasource\DatasourceInterface

Get the active theme's datasource

Returns

protected getUpdateResponse (object $template, string $type) : array

Get the response to return in an AJAX request that updates a template

Parameters
Property Description
$template
object

The template that has been affected

$type
string

The type of template being affected

Returns
array

$result;

protected loadTemplate (string $type, string $path) : mixed

Returns an existing template of a given type

Parameters
Property Description
$type
string
$path
string
Returns
mixed

protected makeTemplateFormWidget (string $type, string $template, string $alias = null) : Backend\Widgets\Form

Returns a form widget for a specified template type.

Parameters
Property Description
$type
string
$template
string
$alias
string
Returns

protected resolveTypeClassName (string $type) : string

Resolves a template type to its class name

Parameters
Property Description
$type
string
Returns
string

protected upgradeSettings (array $settings, array $prevSettings) : array

Processes the component settings so they are ready to be saved.

Parameters
Property Description
$settings
array

The new settings for this template.

$prevSettings
array

The previous settings for this template.

Returns
array

protected validateRequestTheme () : void

Validate that the current request is within the active theme

Returns
void

inherited public __call ($name, $params)

Inherited from Controller
Parameters
Property Description
$name
mixed
$params
mixed
Returns
mixed

inherited public static __callStatic ($name, $params)

Inherited from Controller
Parameters
Property Description
$name
mixed
$params
mixed
Returns
mixed

inherited public __get ($name)

Inherited from Controller
Parameters
Property Description
$name
mixed
Returns
mixed

inherited public __set ($name, $value)

Inherited from Controller
Parameters
Property Description
$name
mixed
$value
mixed
Returns
mixed

inherited public actionExists (string $name, boolean $internal = false) : bool

Inherited from Controller

This method is used internally.

Determines whether an action with the specified name exists. Action must be a class public method. Action name can not be prefixed with the underscore character.

Parameters
Property Description
$name
string

Specifies the action name.

$internal
boolean

Allow protected actions.

Returns
bool

inherited public actionUrl ($action = null, $path = null)

Inherited from Controller

Returns a URL for this controller and supplied action.

Parameters
Property Description
$action
mixed
$path
mixed
Returns
mixed

inherited public addCss (string | array $name, array $attributes = []) : void

Inherited from Controller

Adds StyleSheet asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.

Parameters
Property Description
$name
string | array

When an array of paths are provided they will be passed to the Asset Combiner

$attributes
array

When a string is provided it will be used as the 'build' attribute value

Returns
void

inherited public addDynamicMethod (string $dynamicName, callable $method, string $extension = null)

Inherited from Controller

Programmatically adds a method to the extendable class

Parameters
Property Description
$dynamicName
string
$method
callable
$extension
string
Returns
mixed

inherited public addDynamicProperty (string $dynamicName, mixed $value = null) : void

Inherited from Controller

Programmatically adds a property to the extendable class

Parameters
Property Description
$dynamicName
string

The name of the property to add

$value
mixed

The value of the property

Returns
void

inherited public addJs (string | array $name, array $attributes = []) : void

Inherited from Controller

Adds JavaScript asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.

Parameters
Property Description
$name
string | array

When an array of paths are provided they will be passed to the Asset Combiner

$attributes
array

When a string is provided it will be used as the 'build' attribute value

Returns
void

inherited public addRss (string $name, array $attributes = []) : void

Inherited from Controller

Adds an RSS link asset to the asset list. Call $this->makeAssets() in a view to output corresponding markup.

Parameters
Property Description
$name
string
$attributes
array
Returns
void

inherited public addViewPath (string | array $path) : void

Inherited from Controller

Prepends a path on the available view path locations.

Parameters
Property Description
$path
string | array
Returns
void

inherited public addVite (array | string $entrypoints, ?string $package = null) : void

Inherited from Controller

Adds Vite tags

Parameters
Property Description
$entrypoints
array | string

The list of entry points for Vite

$package
?string

The package name of the plugin or theme

Returns
void

inherited public asExtension (string $shortName) : mixed

Inherited from Controller

Short hand for getClassExtension() method, except takes the short extension name, example:

$this->asExtension('FormController')

Parameters
Property Description
$shortName
string
Returns
mixed

inherited public static clearExtendedClasses () : void

Inherited from Controller

Clear the list of extended classes so they will be re-extended.

Returns
void

inherited public combineAssets (array $assets, string $localPath = "") : string

Inherited from Controller

Run the provided assets through the Asset Combiner

Parameters
Property Description
$assets
array
$localPath
string
Returns
string

inherited public extendClassWith (string $extensionName) : void

Inherited from Controller

Dynamically extend a class with a specified behavior

Parameters
Property Description
$extensionName
string
Returns
void

inherited public extendableCall (string $name, array $params = null) : mixed

Inherited from Controller

Magic method for __call().

Callback priority is as follows:

  • "Dynamic Methods" added locally to the object via addDynamicMethod($name, $callable)
  • Methods available on Behaviors that have been implemented by the object
  • Pass it to the parent's __call() method if it defines one
Parameters
Property Description
$name
string
$params
array
Returns
mixed

inherited public static extendableCallStatic (string $name, array $params = null) : mixed

Inherited from Controller

Magic method for __callStatic()

Parameters
Property Description
$name
string
$params
array
Returns
mixed

inherited public extendableConstruct ()

Inherited from Controller

This method should be called as part of the constructor.

Returns
mixed

inherited public static extendableExtendCallback (callable $callback, boolean $scoped = false, $outerScope = null) : void

Inherited from Controller

Helper method for ::extend() static method.

Parameters
Property Description
$callback
callable
$scoped
boolean
$outerScope
mixed
Returns
void

inherited public extendableGet (string $name) : mixed | null

Inherited from Controller

Magic method for __get()

Parameters
Property Description
$name
string
Returns
mixed | null

inherited public extendableSet (string $name, mixed $value) : void

Inherited from Controller

Magic method for __set()

Parameters
Property Description
$name
string
$value
mixed
Returns
void

inherited public fireSystemEvent (string $event, array $params = [], boolean $halt = true) : mixed

Inherited from Controller

Fires a combination of local and global events. The first segment is removed from the event name locally and the local object is passed as the first argument to the event globally. Halting is also enabled by default.

For example:

$this->fireSystemEvent('backend.list.myEvent', ['my value']);

Is equivalent to:

$this->fireEvent('list.myEvent', ['myvalue'], true);

Event::fire('backend.list.myEvent', [$this, 'myvalue'], true);
Parameters
Property Description
$event
string

Event name

$params
array

Event parameters

$halt
boolean

Halt after first non-null result

Returns
mixed

inherited public fireViewEvent (string $event, array $params = []) : string

Inherited from Controller

Special event function used for extending within view files, allowing HTML to be injected multiple times.

For example:

= $this->fireViewEvent('backend.auth.extendSigninView') ?>
Parameters
Property Description
$event
string

Event name

$params
array

Event parameters

Returns
string

inherited public flushAssets () : void

Inherited from Controller

Disables the use, and subequent broadcast, of assets. This is useful to call during an AJAX request to speed things up. This method works by specifically targeting the hasAssetsDefined method.

Returns
void

inherited public getAjaxHandler () : string

Inherited from Controller

Returns the AJAX handler for the current request, if available.

Returns
string

inherited public getAssetPath (string $fileName, $assetPath = null) : string

Inherited from Controller

Returns the URL to the provided asset. If the provided fileName is a relative path without a leading slash it will be assumbed to be relative to the asset path.

Parameters
Property Description
$fileName
string
$assetPath
mixed
Returns
string

inherited public getAssetPaths () : array

Inherited from Controller

Returns an array of all registered asset paths.

Assets will be prioritized based on their defined ordering.

Returns
array

inherited public getClassExtension (string $name) : mixed

Inherited from Controller

Returns a behavior object from an extendable class, example:

$this->getClassExtension('Backend.Behaviors.FormController')

Parameters
Property Description
$name
string

Fully qualified behavior name

Returns
mixed

inherited public getClassMethods () : array

Inherited from Controller

Get a list of class methods, extension equivalent of get_class_methods()

Returns
array

inherited public getConfigPath (string $fileName, mixed $configPath = null) : string

Inherited from Controller

Locates a file based on it's definition. If the file starts with the ~ symbol it will be returned in context of the application base path, otherwise it will be returned in context of the config path.

Parameters
Property Description
$fileName
string

File to load.

$configPath
mixed

Explicitly define a config path.

Returns
string

Full path to the config file.

inherited public getDynamicProperties () : array

Inherited from Controller

Returns all dynamic properties and their values

Returns
array

['property' => 'value']

inherited public getFatalError () : string

Inherited from Controller
Returns
string

The fatal error message

inherited public getId ($suffix = null)

Inherited from Controller

Returns a unique ID for the controller and route. Useful in creating HTML markup.

Parameters
Property Description
$suffix
mixed
Returns
mixed

inherited public getPublicActions ()

Inherited from Controller

Returns the controllers public actions.

Returns
mixed

inherited public getResponseHeaders () : Symfony\Component\HttpFoundation\ResponseHeaderBag | null

Inherited from Controller

Get the header response bag

Returns
Symfony\Component\HttpFoundation\ResponseHeaderBag | null

inherited public getStatusCode () : int

Inherited from Controller

Returns the status code for the current web response.

Returns
int

Status code

inherited public getViewPath (string $fileName, $viewPaths = null) : string

Inherited from Controller

Locates a file based on its definition. The file name can be prefixed with a symbol (~|$) to return in context of the application or plugin base path, otherwise it will be returned in context of this object view path.

If the fileName cannot be found it will be returned unmodified.

Parameters
Property Description
$fileName
string
$viewPaths
mixed
Returns
string

inherited public getViewPaths () : array

Inherited from Controller

Returns the active view path locations.

Returns
array

inherited public guessConfigPath (string $suffix = "") : string

Inherited from Controller

Guess the package path for the called class.

Parameters
Property Description
$suffix
string

An extra path to attach to the end

Returns
string

inherited public guessConfigPathFrom (string $class, string $suffix = "") : string

Inherited from Controller

Guess the package path from a specified class.

Parameters
Property Description
$class
string

Class to guess path from.

$suffix
string

An extra path to attach to the end

Returns
string

inherited public guessViewPath (string $suffix = "", boolean $isPublic = false) : string | null

Inherited from Controller

Guess the package path for the called class.

Parameters
Property Description
$suffix
string

An extra path to attach to the end

$isPublic
boolean

Returns public path instead of an absolute one

Returns
string | null

inherited public guessViewPathFrom (string $class, string $suffix = "", boolean $isPublic = false) : string | null

Inherited from Controller

Guess the package path from a specified class.

Parameters
Property Description
$class
string

Class to guess path from.

$suffix
string

An extra path to attach to the end

$isPublic
boolean

Returns public path instead of an absolute one

Returns
string | null

inherited public handleError ($exception)

Inherited from Controller

Sets standard page variables in the case of a controller error.

Parameters
Property Description
$exception
mixed
Returns
mixed

inherited public hasAssetsDefined () : bool

Inherited from Controller

Returns true if assets any have been added.

Returns
bool

inherited public hasFatalError () : bool

Inherited from Controller
Returns
bool

Whether a fatal error has been set or not.

inherited public isBackendHintHidden (string $name) : bool

Inherited from Controller

Checks if a hint has been hidden by the user.

Parameters
Property Description
$name
string

Unique key name

Returns
bool

inherited public isClassExtendedWith (string $name) : bool

Inherited from Controller

Check if extendable class is extended with a behavior object

Parameters
Property Description
$name
string

Fully qualified behavior name

Returns
bool

inherited public makeAssets ($type = null) : string | null

Inherited from Controller

Outputs <link> and <script> tags to load assets previously added with addJs, addCss, & addRss method calls depending on the provided $type

Parameters
Property Description
$type
mixed
Returns
string | null

inherited public makeConfig (array $configFile = [], array $requiredConfig = []) : array | stdClass

Inherited from Controller

Reads the contents of the supplied file and applies it to this object.

Parameters
Property Description
$configFile
array
$requiredConfig
array
Returns
array | stdClass

inherited public makeConfigFromArray (array $configArray = []) : stdClass

Inherited from Controller

Makes a config object from an array, making the first level keys properties of a new object.

Parameters
Property Description
$configArray
array

Config array.

Returns
stdClass

The config object

inherited public makeFileContents (string $filePath, array $extraParams = []) : string

Inherited from Controller

Includes a file path using output buffering, making the provided vars available.

Parameters
Property Description
$filePath
string
$extraParams
array
Returns
string

inherited public makeFormWidget (string $class, array $fieldConfig = [], array $widgetConfig = []) : Backend\Classes\FormWidgetBase

Inherited from Controller

Makes a form widget object with the supplied form field and widget configuration.

Parameters
Property Description
$class
string

Widget class name

$fieldConfig
array

A field name, an array of config or a FormField object.

$widgetConfig
array

An array of config.

Returns

The widget object

inherited public makeHintPartial (string $name, string $partial = null, array $params = []) : string

Inherited from Controller

Renders a hint partial, used for displaying informative information that can be hidden by the user. If you don't want to render a partial, you can supply content via the 'content' key of $params.

Parameters
Property Description
$name
string

Unique key name

$partial
string

Reference to content (partial name)

$params
array

Extra parameters

Returns
string

inherited public makeLayout ($name = null, array $params = [], boolean $throwException = true) : string | bool

Inherited from Controller

Render a layout, defaulting to the layout propery specified on the class

Parameters
Property Description
$name
mixed
$params
array
$throwException
boolean
Returns
string | bool

The layout contents, or false.

inherited public makeLayoutPartial (string $partial, array $params = []) : string

Inherited from Controller

Renders a layout partial

Parameters
Property Description
$partial
string
$params
array
Returns
string

inherited public makePartial (string $partial, array $params = [], boolean $throwException = true) : mixed

Inherited from Controller

Render a partial file contents located in the views folder.

Parameters
Property Description
$partial
string
$params
array
$throwException
boolean
Returns
mixed

Partial contents or false if not throwing an exception.

inherited public makeResponse (mixed $contents) : mixed

Inherited from Controller

Prepares a response that considers overrides and custom responses.

Parameters
Property Description
$contents
mixed
Returns
mixed

inherited public makeView (string $view) : string

Inherited from Controller

Loads the specified view. Applies the layout if one is set.

The view file must have the .php extension (or ".htm" for historical reasons) and be located in the views directory

Parameters
Property Description
$view
string
Returns
string

inherited public makeViewContent (string $contents, $layout = null) : string

Inherited from Controller

Renders supplied contents inside a layout.

Parameters
Property Description
$contents
string
$layout
mixed
Returns
string

inherited public makeWidget (string $class, array $widgetConfig = []) : mixed | Backend\Classes\WidgetBase

Inherited from Controller

Makes a widget object with the supplied configuration file.

Parameters
Property Description
$class
string

Widget class name

$widgetConfig
array

An array of config.

Returns

The widget object

inherited public mergeConfig (mixed $configA, mixed $configB) : stdClass

Inherited from Controller

Merges two configuration sources, either prepared or not, and returns them as a single configuration object.

Parameters
Property Description
$configA
mixed
$configB
mixed
Returns
stdClass

The config object

inherited public methodExists (string $name) : bool

Inherited from Controller

Checks if a method exists, extension equivalent of method_exists()

Parameters
Property Description
$name
string
Returns
bool

inherited public onHideBackendHint () : void

Inherited from Controller

Ajax handler to hide a backend hint, once hidden the partial will no longer display for the user.

Returns
void

inherited public onInspectableGetOptions ()

Inherited from InspectableContainer
Returns
mixed

inherited public orderAssets (array $assets) : array

Inherited from Controller

Prioritize assets based on the given order.

Parameters
Property Description
$assets
array
Returns
array

inherited public pageAction ()

Inherited from Controller

Invokes the current controller action without rendering a view, used by AJAX handler that may rely on the logic inside the action.

Returns
mixed

inherited public propertyExists (string $name) : bool

Inherited from Controller

Checks if a property exists, extension equivalent of property_exists()

Parameters
Property Description
$name
string
Returns
bool

inherited public run (string $action = null, array $params = []) : mixed

Inherited from Controller

Execute the controller action.

Parameters
Property Description
$action
string

The action name.

$params
array

Routing parameters to pass to the action.

Returns
mixed

The action result.

inherited public setResponse (mixed $response) : $this

Inherited from Controller

Sets the response for the current page request cycle, this value takes priority over the standard response prepared by the controller.

Parameters
Property Description
$response
mixed

Response object or string

Returns
$this

inherited public setResponseCookie (Symfony\Component\HttpFoundation\Cookie | mixed $cookie) : $this

Inherited from Controller

Add a cookie to the response.

Parameters
Property Description
$cookie
Symfony\Component\HttpFoundation\Cookie | mixed
Returns
$this

inherited public setResponseHeader (string $key, array | string $values, boolean $replace = true) : $this

Inherited from Controller

Set a header on the Response.

Parameters
Property Description
$key
string
$values
array | string
$replace
boolean
Returns
$this

inherited public setStatusCode (int $code) : $this

Inherited from Controller

Sets the status code for the current web response.

Parameters
Property Description
$code
int

Status code

Returns
$this

inherited protected addAsset (string $type, string $path, array $attributes) : void

Inherited from Controller

Adds the provided asset to the internal asset collections

Parameters
Property Description
$type
string
$path
string
$attributes
array
Returns
void

inherited protected execAjaxHandlers ()

Inherited from Controller

This method is used internally.

Invokes a controller event handler and loads the supplied partials.

Returns
mixed

inherited protected execPageAction (string $actionName, array $parameters)

Inherited from Controller

This method is used internally.

Invokes the controller action and loads the corresponding view.

Parameters
Property Description
$actionName
string

Specifies a action name to execute.

$parameters
array

A list of the action parameters.

Returns
mixed

inherited protected extendableIsAccessible (mixed $class, string $propertyName) : bool

Inherited from Controller

Checks if a property is accessible, property equivalent of is_callable()

Parameters
Property Description
$class
mixed
$propertyName
string
Returns
bool

inherited protected extensionCallMethod (ReflectionClass $class, string $method, array $params)

Inherited from Controller

Calls a method through reflection.

Parameters
Property Description
$class
ReflectionClass
$method
string
$params
array
Returns
mixed

inherited protected extensionExtractMethods (string $extensionName, object $extensionObject) : void

Inherited from Controller

Extracts the available methods from a behavior and adds it to the list of callable methods.

Parameters
Property Description
$extensionName
string
$extensionObject
object
Returns
void

inherited protected extensionGetClassLoader () : Winter\Storm\Support\ClassLoader | null

Inherited from Controller

Gets the class loader

Returns
Winter\Storm\Support\ClassLoader | null

inherited protected extensionGetParentClass ($instance = null) : ReflectionClass | false

Inherited from Controller

Gets the parent class using reflection.

The parent class must either not be the Extendable class, or must not be using the ExtendableTrait trait, in order to prevent infinite loops.

Parameters
Property Description
$instance
mixed
Returns
ReflectionClass | false

inherited protected extensionMethodExists (ReflectionClass $class, string $methodName) : bool

Inherited from Controller

Determines if the given class reflection contains the given method.

Parameters
Property Description
$class
ReflectionClass
$methodName
string
Returns
bool

inherited protected extensionNormalizeClassName (string $name) : string

Inherited from Controller

Normalizes the provided extension name allowing for the ClassLoader to inject aliased classes

Parameters
Property Description
$name
string
Returns
string

inherited protected getAssetEntryBuildPath (array $asset) : string

Inherited from Controller

Internal helper, attaches a build code to an asset path

Parameters
Property Description
$asset
array
Returns
string

inherited protected getAssetScheme (string $asset) : string

Inherited from Controller

Internal helper, get asset scheme

Parameters
Property Description
$asset
string
Returns
string

inherited protected getLocalPath (string | null $relativePath) : string

Inherited from Controller
Parameters
Property Description
$relativePath
string | null
Returns
string

inherited protected handleViewException (Throwable $e, integer $obLevel) : void

Inherited from Controller

Handle a view exception.

Parameters
Property Description
$e
Throwable
$obLevel
integer
Returns
void

inherited protected makeXsrfCookie () : Symfony\Component\HttpFoundation\Cookie

Inherited from Controller

Adds anti-CSRF cookie.

Adds a cookie with a token for CSRF checks to the response.

Returns
Symfony\Component\HttpFoundation\Cookie

inherited protected removeDuplicates () : void

Inherited from Controller

Removes duplicate assets from the entire collection.

Returns
void

inherited protected runAjaxHandler ($handler) : bool

Inherited from Controller

Tries to find and run an AJAX handler in the page action.

The method stops as soon as the handler is found.

Parameters
Property Description
$handler
mixed
Returns
bool

Returns true if the handler was found. Returns false otherwise.

inherited protected runAjaxHandlerForWidget ($widget, $handler) : mixed

Inherited from Controller

Specific code for executing an AJAX handler for a widget.

This will append the widget view paths to the controller and merge the vars.

Parameters
Property Description
$widget
mixed
$handler
mixed
Returns
mixed

inherited protected verifyCsrfToken () : bool

Inherited from Controller

Checks the request data / headers for a valid CSRF token.

Returns
bool

Returns false if a valid token is not found or cms.enableCsrfProtection is set to false

inherited protected verifyForceSecure () : bool

Inherited from Controller

Checks if the back-end should force a secure protocol (HTTPS) enabled by config.

Returns
bool
Copyright © 2024 Winter CMS