Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • ActionFormModelBase
  • CActiveDataProvider
  • CalendarEventFormModel
  • CallFormModel
  • CArrayDataProvider
  • CAssetManager
  • CBaseController
  • CBaseUrlRule
  • CCacheHttpSession
  • CClientScript
  • CController
  • CCookieCollection
  • CDataProvider
  • CDataProviderIterator
  • CDbHttpSession
  • CExtController
  • CFormModel
  • CHttpCookie
  • CHttpRequest
  • CHttpSession
  • CHttpSessionIterator
  • COutputEvent
  • CPagination
  • CreatePageFormModel
  • CSort
  • CSqlDataProvider
  • CTheme
  • CThemeManager
  • CUploadedFile
  • CUrlManager
  • CUrlRule
  • CWebApplication
  • CWebModule
  • CWidgetFactory
  • EditMobileFormsFormModel
  • EventCommentPublisherFormModel
  • EventFormModel
  • EventPublisherFormModel
  • FileSystemObjectDataProvider
  • MassActionFormModel
  • MobilePagination
  • NoteFormModel
  • NotificationsController
  • TimeFormModel
  • UploadLogoFormModel
  • X2FormModel
  • X2HttpRequest

Interfaces

  • IDataProvider
  • IWidgetFactory
  • Overview
  • Package
  • Class
  • Tree

Class CWebModule

CWebModule represents an application module.

An application module may be considered as a self-contained sub-application that has its own controllers, models and views and can be reused in a different project as a whole. Controllers inside a module must be accessed with routes that are prefixed with the module ID.

CComponent
Extended by CModule
Extended by CWebModule

Direct known subclasses

X2WebModule

Indirect known subclasses

AccountsModule, ActionsModule, MobileModule, OpportunitiesModule, ProductsModule, QuotesModule, ServicesModule, TemplatesModule, TopicsModule, UsersModule, WorkflowModule, X2LeadsModule, BugReportsModule, CalendarModule, ChartsModule, ContactsModule, DocsModule, GroupsModule, MarketingModule, MediaModule
Package: system\web
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Located at x2engine/framework/web/CWebModule.php
Methods summary
public string
# getName( )

Returns the name of this module. The default implementation simply returns id. You may override this method to customize the name of this module.

Returns the name of this module. The default implementation simply returns id. You may override this method to customize the name of this module.

Returns

string
the name of this module.
public string
# getDescription( )

Returns the description of this module. The default implementation returns an empty string. You may override this method to customize the description of this module.

Returns the description of this module. The default implementation returns an empty string. You may override this method to customize the description of this module.

Returns

string
the description of this module.
public string
# getVersion( )

Returns the version of this module. The default implementation returns '1.0'. You may override this method to customize the version of this module.

Returns the version of this module. The default implementation returns '1.0'. You may override this method to customize the version of this module.

Returns

string
the version of this module.
public string
# getControllerPath( )

Returns

string
the directory that contains the controller classes. Defaults to 'moduleDir/controllers' where moduleDir is the directory containing the module class.
public
# setControllerPath( string $value )

Parameters

$value
string
$value the directory that contains the controller classes.

Throws

CException
if the directory is invalid
public string
# getViewPath( )

Returns

string
the root directory of view files. Defaults to 'moduleDir/views' where moduleDir is the directory containing the module class.
public
# setViewPath( string $path )

Parameters

$path
string
$path the root directory of view files.

Throws

CException
if the directory does not exist.
public string
# getLayoutPath( )

Returns

string
the root directory of layout files. Defaults to 'moduleDir/views/layouts' where moduleDir is the directory containing the module class.
public
# setLayoutPath( string $path )

Parameters

$path
string
$path the root directory of layout files.

Throws

CException
if the directory does not exist.
public boolean
# beforeControllerAction( CController $controller, CAction $action )

The pre-filter for controller actions. This method is invoked before the currently requested controller action and all its filters are executed. You may override this method in the following way:

if(parent::beforeControllerAction($controller,$action))
{
    // your code
    return true;
}
else
    return false;

The pre-filter for controller actions. This method is invoked before the currently requested controller action and all its filters are executed. You may override this method in the following way:

if(parent::beforeControllerAction($controller,$action))
{
    // your code
    return true;
}
else
    return false;

Parameters

$controller
CController
$controller the controller
$action
CAction
$action the action

Returns

boolean
whether the action should be executed.
public
# afterControllerAction( CController $controller, CAction $action )

The post-filter for controller actions. This method is invoked after the currently requested controller action and all its filters are executed. If you override this method, make sure you call the parent implementation at the end.

The post-filter for controller actions. This method is invoked after the currently requested controller action and all its filters are executed. If you override this method, make sure you call the parent implementation at the end.

Parameters

$controller
CController
$controller the controller
$action
CAction
$action the action
Methods inherited from CModule
__construct(), __get(), __isset(), configure(), getBasePath(), getComponent(), getComponents(), getId(), getModule(), getModulePath(), getModules(), getParams(), getParentModule(), hasComponent(), hasModule(), init(), preinit(), preloadComponents(), setAliases(), setBasePath(), setComponent(), setComponents(), setId(), setImport(), setModulePath(), setModules(), setParams()
Methods inherited from CComponent
__call(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public string $defaultController 'default'
#

the ID of the default controller for this module. Defaults to 'default'.

the ID of the default controller for this module. Defaults to 'default'.

public mixed $layout
#

the layout that is shared by the controllers inside this module. If a controller has explicitly declared its own CController::layout layout, this property will be ignored. If this is null (default), the application's layout or the parent module's layout (if available) will be used. If this is false, then no layout will be used.

the layout that is shared by the controllers inside this module. If a controller has explicitly declared its own CController::layout layout, this property will be ignored. If this is null (default), the application's layout or the parent module's layout (if available) will be used. If this is false, then no layout will be used.

public string $controllerNamespace
#

Namespace that should be used when loading controllers. Default is to use global namespace.

Namespace that should be used when loading controllers. Default is to use global namespace.

Since

1.1.11
public array $controllerMap array()
#

mapping from controller ID to controller configurations. Pleaser refer to CWebApplication::$controllerMap for more details.

mapping from controller ID to controller configurations. Pleaser refer to CWebApplication::$controllerMap for more details.

Properties inherited from CModule
$behaviors, $preload
Magic properties summary
public string $name
#

The name of this module.

The name of this module.

public string $description
#

The description of this module.

The description of this module.

public string $version
#

The version of this module.

The version of this module.

public string $controllerPath
#

The directory that contains the controller classes. Defaults to 'moduleDir/controllers' where moduleDir is the directory containing the module class.

The directory that contains the controller classes. Defaults to 'moduleDir/controllers' where moduleDir is the directory containing the module class.

public string $viewPath
#

The root directory of view files. Defaults to 'moduleDir/views' where moduleDir is the directory containing the module class.

The root directory of view files. Defaults to 'moduleDir/views' where moduleDir is the directory containing the module class.

public string $layoutPath
#

The root directory of layout files. Defaults to 'moduleDir/views/layouts' where moduleDir is the directory containing the module class.

The root directory of layout files. Defaults to 'moduleDir/views/layouts' where moduleDir is the directory containing the module class.

Magic properties inherited from CModule
$aliases, $basePath, $components, $id, $import, $modulePath, $modules, $params, $parentModule
API documentation generated by ApiGen 2.8.0