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

  • ActionFormModelBase
  • CalendarEventFormModel
  • CallFormModel
  • CreatePageFormModel
  • EditMobileFormsFormModel
  • EventCommentPublisherFormModel
  • EventFormModel
  • EventPublisherFormModel
  • FileSystemObjectDataProvider
  • MassActionFormModel
  • MobilePagination
  • NoteFormModel
  • NotificationsController
  • TimeFormModel
  • UploadLogoFormModel
  • X2FormModel
  • X2HttpRequest
  • Overview
  • Package
  • Class
  • Tree

Class NotificationsController

CController manages a set of actions which deal with the corresponding user requests.

Through the actions, CController coordinates the data flow between models and views.

When a user requests an action 'XYZ', CController will do one of the following:

  1. Method-based action: call method 'actionXYZ' if it exists;
  2. Class-based action: create an instance of class 'XYZ' if the class is found in the action class map (specified via CController::actions(), and execute the action;
  3. Call CController::missingAction(), which by default will raise a 404 HTTP exception.

If the user does not specify an action, CController will run the action specified by CController::$defaultAction, instead.

CController may be configured to execute filters before and after running actions. Filters preprocess/postprocess the user request/response and may quit executing actions if needed. They are executed in the order they are specified. If during the execution, any of the filters returns true, the rest filters and the action will no longer get executed.

Filters can be individual objects, or methods defined in the controller class. They are specified by overriding CController::filters() method. The following is an example of the filter specification:

array(
    'accessControl - login',
    'ajaxOnly + search',
    array(
        'COutputCache + list',
        'duration'=>300,
    ),
)

The above example declares three filters: accessControl, ajaxOnly, COutputCache. The first two are method-based filters (defined in CController), which refer to filtering methods in the controller class; while the last refers to an object-based filter whose class is 'system.web.widgets.COutputCache' and the 'duration' property is initialized as 300 (s).

For method-based filters, a method named 'filterXYZ($filterChain)' in the controller class will be executed, where 'XYZ' stands for the filter name as specified in CController::filters(). Note, inside the filter method, you must call <span class="php-var">$filterChain</span>->run() if the action should be executed. Otherwise, the filtering process would stop at this filter.

Filters can be specified so that they are executed only when running certain actions. For method-based filters, this is done by using '+' and '-' operators in the filter specification. The '+' operator means the filter runs only when the specified actions are requested; while the '-' operator means the filter runs only when the requested action is not among those actions. For object-based filters, the '+' and '-' operators are following the class name.

CComponent
Extended by CBaseController
Extended by CController
Extended by NotificationsController
Package: system\web
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/protected/controllers/NotificationsController.php
Methods summary
public array
# accessRules( )

Returns the access rules for this controller. Override this method if you use the filterAccessControl accessControl filter.

Returns the access rules for this controller. Override this method if you use the filterAccessControl accessControl filter.

Returns

array
list of access rules. See CAccessControlFilter for details about rule specification.

Overrides

CController::accessRules()
public
# actionGet( )

Obtain all current notifications/events for the current web user.

Obtain all current notifications/events for the current web user.

public
# getNotifications( mixed $lastId = 0, mixed $getNext = false )

Looks up notifications using the specified offset and limit

Looks up notifications using the specified offset and limit

public
# actionMarkViewed( )

Mark an action as viewed.

Mark an action as viewed.

public
# actionDelete( type $id )

Delete an action by its ID. Encode and return the next notification if requested

Delete an action by its ID. Encode and return the next notification if requested

Parameters

$id
type
$id
public
# actionDeleteAll( )

Clear all notifications.

Clear all notifications.

public static string
# convertLineBreaks( string $text, boolean $allowDouble = true, boolean $allowUnlimited = false )

Normalize linebreaks in output.

Normalize linebreaks in output.

Parameters

$text
string
$text
$allowDouble
boolean
$allowDouble
$allowUnlimited
boolean
$allowUnlimited

Returns

string
Methods inherited from CController
__construct(), actions(), afterAction(), afterRender(), beforeAction(), beforeRender(), behaviors(), clearPageStates(), createAbsoluteUrl(), createAction(), createActionFromMap(), createUrl(), filterAccessControl(), filterAjaxOnly(), filterPostOnly(), filters(), forward(), getAction(), getActionParams(), getCachingStack(), getClips(), getId(), getLayoutFile(), getModule(), getPageState(), getPageTitle(), getRoute(), getUniqueId(), getViewFile(), getViewPath(), init(), invalidActionParams(), isCachingStackEmpty(), loadPageStates(), missingAction(), processDynamicOutput(), processOutput(), recordCachingAction(), redirect(), refresh(), render(), renderClip(), renderDynamic(), renderDynamicInternal(), renderPartial(), renderText(), replaceDynamicOutput(), resolveViewFile(), 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 inherited from CController
STATE_INPUT_NAME
Properties inherited from CController
$defaultAction, $layout
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