Module

Type
Class
Namespace
craft\debug
Inherits
craft\debug\Module » yii\debug\Module » yii\base\Module » yii\di\ServiceLocator » yii\base\Component » yii\base\BaseObject
Implements
yii\base\BootstrapInterface, yii\base\Configurable
Since
3.0.0

View source

# Public Properties

Property Description
aliases array – List of path aliases to be defined.
allowedHosts array – The list of hosts that are allowed to access this module.
allowedIPs array – The list of IPs that are allowed to access this module.
basePath string – The root directory of the module.
behaviors yii\base\Behavior – List of behaviors attached to this component
checkAccessCallback callable – A valid PHP callback that returns true if user is allowed to use web shell and false otherwise The signature is the following: function (Action
components array – The list of the component definitions or the loaded component instances (ID => definition or instance).
controllerMap array – Mapping from controller ID to controller configurations.
controllerNamespace string – The namespace that controller classes are in.
controllerPath string – The directory that contains the controller classes.
dataPath string – The directory storing the debugger data files.
debugHeaders yii\base\Event
defaultHeight integer – The debug bar default height, as a percentage of the total screen height
defaultPanel string – The name of the panel that should be visible when opening the debug panel.
defaultRoute string – The default route of this module.
dirMode integer – The permission to be set for newly created directories.
disableCallbackRestrictionWarning boolean – Whether to disable access callback restriction warning triggered by checkAccess function
disableIpRestrictionWarning boolean – Whether to disable IP address restriction warning triggered by checkAccess function
enableDebugLogs boolean – Whether to enable message logging for the requests about debug module actions.
fileMode integer – The permission to be set for newly created debugger data files.
historySize integer – The maximum number of debug data files to keep.
id string – An ID that uniquely identifies this module among other modules which have the same parent.
layout string, boolean – The layout that should be applied for views within this module.
layoutPath string – The root directory of layout files.
logTarget yii\debug\LogTarget
module yii\base\Module – The parent module of this module.
modules array – The modules (indexed by their IDs).
pageTitle string, callable – Page title could be a string or a callable function ```php .
panels array, yii\debug\Panel – List of debug panels.
params array – Custom module parameters (name => value).
toolbarHtml
traceLine mixed – The string with placeholders to be be substituted or an anonymous function that returns the trace line string.
tracePathMappings array – Used when the virtual, containerized, or remote debug trace paths don't correspond to the developers local paths.
uniqueId string – The unique ID of the module.
urlRuleClass string – The \yii\debug\UrlRule class to use for rules generated by this module.
version string – The version of this module.
viewPath string – The root directory of view files.

# Public Methods

Method Description
__call() Calls the named method which is not a class method.
__clone() This method is called after the object is created by cloning an existing one.
__construct() Constructor.
__get() Returns the value of an object property.
__isset() Checks if a property is set, i.e. defined and not null.
__set() Sets value of an object property.
__unset() Sets an object property to null.
afterAction() This method is invoked right after an action within this module is executed.
attachBehavior() Attaches a behavior to this component.
attachBehaviors() Attaches a list of behaviors to the component.
beforeAction() This method is invoked right before an action within this module is executed.
behaviors() Returns a list of behaviors that this component should behave as.
bootstrap() Bootstrap method to be called during application bootstrap stage.
canGetProperty() Returns a value indicating whether a property can be read.
canSetProperty() Returns a value indicating whether a property can be set.
className() Returns the fully qualified name of this class.
clear() Removes the component from the locator.
createController() Creates a controller instance based on the given route.
createControllerByID() Creates a controller based on the given controller ID.
detachBehavior() Detaches a behavior from the component.
detachBehaviors() Detaches all behaviors from the component.
ensureBehaviors() Makes sure that the behaviors declared in behaviors() are attached to this component.
get() Returns the component instance with the specified ID.
getBasePath() Returns the root directory of the module.
getBehavior() Returns the named behavior object.
getBehaviors() Returns all behaviors attached to this component.
getComponents() Returns the list of the component definitions or the loaded component instances.
getControllerPath() Returns the directory that contains the controller classes according to controllerNamespace.
getInstance() Returns the currently requested instance of this module class.
getLayoutPath() Returns the directory that contains layout view files for this module.
getModule() Retrieves the child module of the specified ID.
getModules() Returns the sub-modules in this module.
getToolbarHtml() Gets toolbar HTML
getUniqueId() Returns an ID that uniquely identifies this module among all modules within the current application.
getVersion() Returns current module version.
getViewPath() Returns the directory that contains the view files for this module.
getYiiLogo() Returns the logo URL to be used in <img src="
has() Returns a value indicating whether the locator has the specified component definition or has instantiated the component.
hasEventHandlers() Returns a value indicating whether there is any handler attached to the named event.
hasMethod() Returns a value indicating whether a method is defined.
hasModule() Checks whether the child module of the specified ID exists.
hasProperty() Returns a value indicating whether a property is defined.
htmlTitle()
init() Initializes the object.
off() Detaches an existing event handler from this component.
on() Attaches an event handler to an event.
renderToolbar() Renders mini-toolbar at the end of page body.
runAction() Runs a controller action specified by a route.
set() Registers a component definition with this locator.
setAliases() Defines path aliases.
setBasePath() Sets the root directory of the module.
setComponents() Registers a set of component definitions in this locator.
setDebugHeaders() Setting headers to transfer debug data in AJAX requests without interfering with the request itself.
setInstance() Sets the currently requested instance of this module class.
setLayoutPath() Sets the directory that contains the layout files.
setModule() Adds a sub-module to this module.
setModules() Registers sub-modules in the current module.
setVersion() Sets current module version.
setViewPath() Sets the directory that contains the view files.
setYiiLogo() Sets the logo URL to be used in <img src="
trigger() Triggers an event.

# renderToolbar()

Renders mini-toolbar at the end of page body.

View source

Arguments

Throws

# Protected Methods

Method Description
checkAccess() Checks if current user is allowed to access the module
corePanels()
defaultVersion() Returns default module version.
initPanels() Initializes panels.
resetGlobalSettings() Resets potentially incompatible global settings done in app config.

# Constants

Constant Description
DEFAULT_IDE_TRACELINE