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
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • MenuList
  • MobileController
  • Overview
  • Package
  • Class
  • Tree

Class MobileController

CComponent
Extended by CBaseController
Extended by CController
Extended by X2Controller
Extended by MobileController
Package: application\modules\mobile\components
Located at x2engine/protected/modules/mobile/controllers/MobileController.php
Methods summary
public array
# behaviors( )

Returns a list of behaviors that this controller should behave as. The return value should be an array of behavior configurations indexed by behavior names. Each behavior configuration can be either a string specifying the behavior class or an array of the following structure:

'behaviorName'=>array(
    'class'=>'path.to.BehaviorClass',
    'property1'=>'value1',
    'property2'=>'value2',
)

Returns a list of behaviors that this controller should behave as. The return value should be an array of behavior configurations indexed by behavior names. Each behavior configuration can be either a string specifying the behavior class or an array of the following structure:

'behaviorName'=>array(
    'class'=>'path.to.BehaviorClass',
    'property1'=>'value1',
    'property2'=>'value2',
)

Note, the behavior classes must implement IBehavior or extend from CBehavior. Behaviors declared in this method will be attached to the controller when it is instantiated.

For more details about behaviors, see CComponent.

Returns

array
the behavior configurations (behavior name=>behavior configuration)

Overrides

CController::behaviors()
public
# filterAccessControl( CFilterChain $filterChain )

override to allow user loginUrl to be reset for mobile

override to allow user loginUrl to be reset for mobile

Parameters

$filterChain
CFilterChain
$filterChain the filter chain that the filter is on.

Overrides

CController::filterAccessControl()
public array
# filters( )

Returns

array
action filters

Overrides

CController::filters()
public array
# accessRules( )

Specifies the access control rules. This method is used by the 'accessControl' filter.

Specifies the access control rules. This method is used by the 'accessControl' filter.

Returns

array
access control rules

Overrides

CController::accessRules()
public array
# actions( )

Returns a list of external action classes. Array keys are action IDs, and array values are the corresponding action class in dot syntax (e.g. 'edit'=>'application.controllers.article.EditArticle') or arrays representing the configuration of the actions, such as the following,

return array(
    'action1'=>'path.to.Action1Class',
    'action2'=>array(
        'class'=>'path.to.Action2Class',
        'property1'=>'value1',
        'property2'=>'value2',
    ),
);

Derived classes may override this method to declare external actions.

Returns a list of external action classes. Array keys are action IDs, and array values are the corresponding action class in dot syntax (e.g. 'edit'=>'application.controllers.article.EditArticle') or arrays representing the configuration of the actions, such as the following,

return array(
    'action1'=>'path.to.Action1Class',
    'action2'=>array(
        'class'=>'path.to.Action2Class',
        'property1'=>'value1',
        'property2'=>'value2',
    ),
);

Derived classes may override this method to declare external actions.

Note, in order to inherit actions defined in the parent class, a child class needs to merge the parent actions with child actions using functions like array_merge().

You may import actions from an action provider (such as a widget, see CWidget::actions), like the following:

return array(
    ...other actions...
    // import actions declared in ProviderClass::actions()
    // the action IDs will be prefixed with 'pro.'
    'pro.'=>'path.to.ProviderClass',
    // similar as above except that the imported actions are
    // configured with the specified initial property values
    'pro2.'=>array(
        'class'=>'path.to.ProviderClass',
        'action1'=>array(
            'property1'=>'value1',
        ),
        'action2'=>array(
            'property2'=>'value2',
        ),
    ),
)

In the above, we differentiate action providers from other action declarations by the array keys. For action providers, the array keys must contain a dot. As a result, an action ID 'pro2.action1' will be resolved as the 'action1' action declared in the 'ProviderClass'.

Returns

array
list of external action classes

See

CController::createAction()

Overrides

X2Controller::actions()
public
# actionSettings( )
public
# actionLicense( )
public
# actionAbout( )
public
# actionPing( mixed $version )

Used by PhoneGap mobile app to validate installation URL and ensure mutual app compatibility

Used by PhoneGap mobile app to validate installation URL and ensure mutual app compatibility

public
# actionRecentItems( )
public
# actionIndex( )

This is the default 'index' action that is invoked when an action is not explicitly requested by users.

This is the default 'index' action that is invoked when an action is not explicitly requested by users.

public string
# getRealIp( )

Obtain the IP address of the current web client.

Obtain the IP address of the current web client.

Returns

string
public
# actionForgetMe( )

Clears remember me cookies and redirects to login page.

Clears remember me cookies and redirects to login page.

public
# actionLogin( )

Displays the login page

Displays the login page

public
# actionHome( )

Displays the home page

Displays the home page

public
# actionLogout( )

Logs out the current user and redirect to homepage.

Logs out the current user and redirect to homepage.

public
# redirect( mixed $url, boolean $terminate = true, integer $statusCode = 302 )

Allow special PhoneGap parameters to persist across redirects

Allow special PhoneGap parameters to persist across redirects

Parameters

$url
mixed
$url the URL to be redirected to. If the parameter is an array, the first element must be a route to a controller action and the rest are GET parameters in name-value pairs.
$terminate
boolean
$terminate whether to terminate the current application after calling this method. Defaults to true.
$statusCode
integer
$statusCode the HTTP status code. Defaults to 302. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for details about HTTP status code.

Overrides

CController::redirect()
Methods inherited from X2Controller
badRequest(), badRequestException(), beforeAction(), getBehaviorActions(), isAjaxRequest(), redirectToLogin(), resolveViewFile(), runBehaviorBeforeActionHandlers(), setFileFields(), validateMobileRequest()
Methods inherited from CController
__construct(), afterAction(), afterRender(), beforeRender(), clearPageStates(), createAbsoluteUrl(), createAction(), createActionFromMap(), createUrl(), filterAjaxOnly(), filterPostOnly(), forward(), getAction(), getActionParams(), getCachingStack(), getClips(), getId(), getLayoutFile(), getModule(), getPageState(), getPageTitle(), getRoute(), getUniqueId(), getViewFile(), getViewPath(), init(), invalidActionParams(), isCachingStackEmpty(), loadPageStates(), missingAction(), processDynamicOutput(), processOutput(), recordCachingAction(), refresh(), render(), renderClip(), renderDynamic(), renderDynamicInternal(), renderPartial(), renderText(), replaceDynamicOutput(), run(), runAction(), runActionWithFilters(), savePageStates(), setAction(), setPageState(), setPageTitle()
Methods inherited from CBaseController
beginCache(), beginClip(), beginContent(), beginWidget(), createWidget(), endCache(), endClip(), endContent(), endWidget(), renderFile(), renderInternal(), widget()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Constants summary
string APP_VERSION_COOKIE_NAME 'phoneGapAppVersionNumber'
#
Constants inherited from CController
STATE_INPUT_NAME
Properties summary
public mixed $layout 'application.modules.mobile.views.layouts.main'
#

the name of the layout to be applied to this controller's views. Defaults to null, meaning the CWebApplication::layout application layout is used. If it is false, no layout will be applied. The CWebModule::layout module layout will be used if the controller belongs to a module and this layout property is null.

the name of the layout to be applied to this controller's views. Defaults to null, meaning the CWebApplication::layout application layout is used. If it is false, no layout will be applied. The CWebModule::layout module layout will be used if the controller belongs to a module and this layout property is null.

public array $menu array()
#

context menu items. This property will be assigned to CMenu::items.

context menu items. This property will be assigned to CMenu::items.

public array $breadcrumbs array()
#

the breadcrumbs of the current page. The value of this property will be assigned to CBreadcrumbs::links. Please refer to CBreadcrumbs::links for more details on how to specify this property.

the breadcrumbs of the current page. The value of this property will be assigned to CBreadcrumbs::links. Please refer to CBreadcrumbs::links for more details on how to specify this property.

public string $modelClass 'Admin'
#
Properties inherited from CController
$defaultAction
Magic properties inherited from CController
$action, $actionParams, $cachingStack, $clips, $id, $module, $pageTitle, $route, $uniqueId, $viewPath
X2CRM Documentation API documentation generated by ApiGen 2.8.0