My Application Class Reference

ComprasModule

Inheritance class ComprasModule » CWebModule » CModule » CComponent
Source Code app/modules/Compras/ComprasModule.php

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
basePath string Returns the root directory of the module. CModule
behaviors array the behaviors that should be attached to the module. CModule
components array Returns the application components. CModule
controllerMap array mapping from controller ID to controller configurations. CWebModule
controllerNamespace string Namespace that should be used when loading controllers. CWebModule
controllerPath string the directory that contains the controller classes. CWebModule
defaultController string the ID of the default controller for this module. CWebModule
description string Returns the description of this module. CWebModule
id string Returns the module ID. CModule
layout mixed the layout that is shared by the controllers inside this module. CWebModule
layoutPath string the root directory of layout files. CWebModule
modulePath string Returns the directory that contains the application modules. CModule
modules array Returns the configuration of the currently installed modules. CModule
name string Returns the name of this module. CWebModule
params CAttributeCollection Returns user-defined parameters. CModule
parentModule CModule Returns the parent module. CModule
preload array the IDs of the application components that should be preloaded. CModule
version string Returns the version of this module. CWebModule
viewPath string the root directory of view files. CWebModule

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. CComponent
__construct() Constructor. CModule
__get() Getter magic method. CModule
__isset() Checks if a property value is null. CModule
__set() Sets value of a component property. CComponent
__unset() Sets a component property to be null. CComponent
afterControllerAction() The post-filter for controller actions. CWebModule
asa() Returns the named behavior object. CComponent
attachBehavior() Attaches a behavior to this component. CComponent
attachBehaviors() Attaches a list of behaviors to the component. CComponent
attachEventHandler() Attaches an event handler to an event. CComponent
beforeControllerAction() ComprasModule
canGetProperty() Determines whether a property can be read. CComponent
canSetProperty() Determines whether a property can be set. CComponent
configure() Configures the module with the specified configuration. CModule
detachBehavior() Detaches a behavior from the component. CComponent
detachBehaviors() Detaches all behaviors from the component. CComponent
detachEventHandler() Detaches an existing event handler. CComponent
disableBehavior() Disables an attached behavior. CComponent
disableBehaviors() Disables all behaviors attached to this component. CComponent
enableBehavior() Enables an attached behavior. CComponent
enableBehaviors() Enables all behaviors attached to this component. CComponent
evaluateExpression() Evaluates a PHP expression or callback under the context of this component. CComponent
getBasePath() Returns the root directory of the module. CModule
getComponent() Retrieves the named application component. CModule
getComponents() Returns the application components. CModule
getControllerPath() Returns the directory that contains the controller classes. Defaults to 'moduleDir/controllers' where moduleDir is the directory containing the module class. CWebModule
getDescription() Returns the description of this module. CWebModule
getEventHandlers() Returns the list of attached event handlers for an event. CComponent
getId() Returns the module ID. CModule
getLayoutPath() Returns the root directory of layout files. Defaults to 'moduleDir/views/layouts' where moduleDir is the directory containing the module class. CWebModule
getModule() Retrieves the named application module. CModule
getModulePath() Returns the directory that contains the application modules. CModule
getModules() Returns the configuration of the currently installed modules. CModule
getName() Returns the name of this module. CWebModule
getParams() Returns user-defined parameters. CModule
getParentModule() Returns the parent module. CModule
getVersion() Returns the version of this module. CWebModule
getViewPath() Returns the root directory of view files. Defaults to 'moduleDir/views' where moduleDir is the directory containing the module class. CWebModule
hasComponent() Checks whether the named component exists. CModule
hasEvent() Determines whether an event is defined. CComponent
hasEventHandler() Checks whether the named event has attached handlers. CComponent
hasModule() Returns a value indicating whether the specified module is installed. CModule
hasProperty() Determines whether a property is defined. CComponent
init() ComprasModule
raiseEvent() Raises an event. CComponent
setAliases() Defines the root aliases. CModule
setBasePath() Sets the root directory of the module. CModule
setComponent() Puts a component under the management of the module. CModule
setComponents() Sets the application components. CModule
setControllerPath() Sets the directory that contains the controller classes. CWebModule
setId() Sets the module ID. CModule
setImport() Sets the aliases that are used in the module. CModule
setLayoutPath() Sets the root directory of layout files. CWebModule
setModulePath() Sets the directory that contains the application modules. CModule
setModules() Configures the sub-modules of this module. CModule
setParams() Sets user-defined parameters. CModule
setViewPath() Sets the root directory of view files. CWebModule

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
preinit() Preinitializes the module. CModule
preloadComponents() Loads static application components. CModule

Method Details

beforeControllerAction() method
public void beforeControllerAction($controller, $action)
$controller
$action
Source Code: app/modules/Compras/ComprasModule.php#17 (show)
public function beforeControllerAction($controller$action)
{
    if(
parent::beforeControllerAction($controller$action))
    {
        
// this method is called before any module controller action is performed
        // you may place customized code here
        
return true;
    }
    else
        return 
false;
}

init() method
public void init()
Source Code: app/modules/Compras/ComprasModule.php#5 (show)
public function init()
{
    
// this method is called when the module is being created
    // you may place code here to customize the module or the application

    // import the module-level models and components
    
$this->setImport(array(
        
'Compras.models.*',
        
'Compras.components.*',
    ));
}

Copyright © 2008-2011 by Yii Software LLC
All Rights Reserved.