Skip to content

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 ​

PropertyDescription
aliasesarray – List of path aliases to be defined.
allowedHostsarray – The list of hosts that are allowed to access this module.
allowedIPsarray – The list of IPs that are allowed to access this module.
basePathstring – The root directory of the module.
behaviorsyii\base\Behavior – List of behaviors attached to this component.
checkAccessCallbackcallable – A valid PHP callback that returns true if user is allowed to use web shell and false otherwise
componentsarray – The list of the component definitions or the loaded component instances (ID => definition or instance).
controllerMaparray – Mapping from controller ID to controller configurations.
controllerNamespacestring, null – The namespace that controller classes are in.
controllerPathstring – The directory that contains the controller classes.
dataPathstring – The directory storing the debugger data files.
debugHeadersyii\base\Event
defaultHeightinteger – The debug bar default height, as a percentage of the total screen height
defaultPanelstring – The name of the panel that should be visible when opening the debug panel.
defaultRoutestring – The default route of this module.
dirModeinteger – The permission to be set for newly created directories.
disableCallbackRestrictionWarningboolean – Whether to disable access callback restriction warning triggered by checkAccess function
disableIpRestrictionWarningboolean – Whether to disable IP address restriction warning triggered by checkAccess function
enableDebugLogsboolean – Whether to enable message logging for the requests about debug module actions.
fileModeinteger – The permission to be set for newly created debugger data files.
historySizeinteger – The maximum number of debug data files to keep.
idstring – An ID that uniquely identifies this module among other modules which have the same parent.
layoutstring, boolean, null – The layout that should be applied for views within this module.
layoutPathstring – The root directory of layout files.
logTargetyii\debug\LogTarget, array, string – The logTarget object, or the configuration for creating the logTarget object.
moduleyii\base\Module, null – The parent module of this module.
modulesarray – The modules (indexed by their IDs).
pageTitlestring, callable – Page title could be a string or a callable function
panelsarray, yii\debug\Panel – List of debug panels.
paramsarray – Custom module parameters (name => value).
skipAjaxRequestUrlarray – Routes of AJAX requests to skip from being displayed in toolbar
toolbarHtml
traceLinemixed – The string with placeholders to be be substituted or an anonymous function that returns the trace line string.
tracePathMappingsarray – Used when the virtual, containerized, or remote debug trace paths don't correspond to the developers local paths.
uniqueIdstring – The unique ID of the module.
urlRuleClassstring – The \yii\debug\UrlRule class to use for rules generated by this module.
versionstring – The version of this module.
viewPathstring – The root directory of view files.

Public Methods ​

MethodDescription
__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()Getter magic method.
__isset()Checks if a property value is null.
__set()Sets the value of a component property.
__unset()Sets a component property to be 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 for this component.
htmlTitle()
init()Initializes the module.
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.
setControllerPath()Sets the directory that contains the controller classes.
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 ​

MethodDescription
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 ​

ConstantDescription
DEFAULT_IDE_TRACELINE