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

  • AccountsGridViewProfileWidget
  • ActionMenu
  • ActionsGridViewProfileWidget
  • ActionsQuickCreateRelationshipBehavior
  • ActiveDateRangeInput
  • ApplicationConfigBehavior
  • Attachments
  • ChatBox
  • CommonControllerBehavior
  • ContactMapInlineTags
  • ContactsGridViewProfileWidget
  • CronForm
  • CSaveRelationsBehavior
  • DateRangeInputsWidget
  • DocsGridViewProfileWidget
  • DocViewer
  • DocViewerProfileWidget
  • EButtonColumnWithClearFilters
  • EmailDeliveryBehavior
  • EmailProgressControl
  • EncryptedFieldsBehavior
  • EventsChartProfileWidget
  • FileUploader
  • FontPickerInput
  • Formatter
  • FormView
  • GridViewWidget
  • History
  • IframeWidget
  • ImportExportBehavior
  • InlineActionForm
  • InlineEmailAction
  • InlineEmailForm
  • InlineEmailModelBehavior
  • InlineQuotes
  • JSONEmbeddedModelFieldsBehavior
  • JSONFieldsDefaultValuesBehavior
  • LeadRoutingBehavior
  • LeftWidget
  • LoginThemeHelper
  • LoginThemeHelperBase
  • MarketingGridViewProfileWidget
  • MediaBox
  • MessageBox
  • MobileFormatter
  • MobileFormLayoutRenderer
  • MobileLayoutRenderer
  • MobileLoginThemeHelper
  • MobileViewLayoutRenderer
  • ModelFileUploader
  • NewWebLeadsGridViewProfileWidget
  • NormalizedJSONFieldsBehavior
  • NoteBox
  • OnlineUsers
  • OpportunitiesGridViewProfileWidget
  • Panel
  • ProfileDashboardManager
  • ProfileGridViewWidget
  • ProfileLayoutEditor
  • ProfilesGridViewProfileWidget
  • Publisher
  • PublisherActionTab
  • PublisherCalendarEventTab
  • PublisherCallTab
  • PublisherCommentTab
  • PublisherEventTab
  • PublisherSmallCalendarEventTab
  • PublisherTab
  • PublisherTimeTab
  • QuickContact
  • QuickCreateRelationshipBehavior
  • QuotesGridViewProfileWidget
  • RecordAliasesWidget
  • RecordViewLayoutManager
  • RecordViewWidgetManager
  • RememberPagination
  • Reminders
  • ResponseBehavior
  • ResponsiveHtml
  • SearchIndexBehavior
  • ServicesGridViewProfileWidget
  • SmallCalendar
  • SmartActiveDataProvider
  • SmartDataProviderBehavior
  • SmartSort
  • SocialForm
  • SortableWidgetManager
  • SortableWidgets
  • TagBehavior
  • TagCloud
  • TemplatesGridViewProfileWidget
  • TimeZone
  • TopContacts
  • TopSites
  • TransformedFieldStorageBehavior
  • TranslationLogger
  • TwitterFeed
  • TwoColumnSortableWidgetManager
  • UpdaterBehavior
  • UpdatesForm
  • UserIdentity
  • UsersChartProfileWidget
  • WorkflowBehavior
  • X2ActiveGridView
  • X2ActiveGridViewForSortableWidgets
  • X2AssetManager
  • X2AuthManager
  • X2ChangeLogBehavior
  • X2ClientScript
  • X2Color
  • X2DateUtil
  • X2FixtureManager
  • X2FlowFormatter
  • X2GridView
  • X2GridViewBase
  • X2GridViewForSortableWidgets
  • X2GridViewSortableWidgetsBehavior
  • X2LeadsGridViewProfileWidget
  • X2LinkableBehavior
  • X2ListView
  • X2PillBox
  • X2ProgressBar
  • X2SmartSearchModelBehavior
  • X2TimestampBehavior
  • X2TranslationBehavior
  • X2UrlRule
  • X2WebModule
  • X2Widget
  • X2WidgetList
  • Overview
  • Package
  • Class
  • Tree

Class X2GridViewBase

Custom grid view display function.

Displays a dynamic grid view that permits save-able resizing and reordering of columns and also the adding of new columns based on the available fields for the model.

CComponent
Extended by CBaseController
Extended by CWidget
Extended by CBaseListView
Extended by CGridView
Extended by X2GridViewBase

Direct known subclasses

X2ActiveGridView, X2GridViewGeneric

Indirect known subclasses

InlineRelationshipsGridView, X2ActiveGridViewForSortableWidgets, X2GridView, X2GridViewForSortableWidgets
Abstract
Package: application\components
Located at x2engine/protected/components/X2GridView/X2GridViewBase.php
Methods summary
abstract protected
# setSummaryText( )
abstract protected
# generateColumns( )
public static
# massActionLabelComparison( mixed $a, mixed $b )

Used instead of a closure because closure definition was causing errors, possibly related to APC cache size settings.

Used instead of a closure because closure definition was causing errors, possibly related to APC cache size settings.

public
# __construct( CBaseController $owner = null )

Constructor.

Constructor.

Parameters

$owner
CBaseController
$owner owner/creator of this widget. It could be either a widget or a controller.

Overrides

CWidget::__construct()
public
# behaviors( )
public
# setResultsPerPage( mixed $resultsPerPage )
public
# getResultsPerPage( )
public
# registerPackages( )
public
# getPackages( )
public
# setGvSettingsName( string $gvSettingsName )

Magic setter for gvSettingsName.

Magic setter for gvSettingsName.

Parameters

$gvSettingsName
string
$gvSettingsName
public
# getModuleName( )
public
# setModuleName( mixed $moduleName )
public string
# getGvSettingsName( )

Magic getter for gvSettingsName. If not set explicitly, will be set to viewName

Magic getter for gvSettingsName. If not set explicitly, will be set to viewName

Returns

string
public
# setNamespacePrefix( string $namespacePrefix )

Magic setter for _namespacePrefix

Magic setter for _namespacePrefix

Parameters

$namespacePrefix
string
public string
# getNamespacePrefix( )

Magic getter for _namespacePrefix

Magic getter for _namespacePrefix

Returns

string
public
# renderKeys( )

This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Overrides

CBaseListView::renderKeys()
public
# setUpStickyHeader( )

Registers JS which makes the grid header sticky Preconditions:
- The CGridView template string must be set up in a highly specific way
- Example:
'<div id="x2-gridview-top-bar-outer" class="x2-gridview-fixed-top-bar-outer">
<div id="x2-gridview-top-bar-inner" class="x2-gridview-fixed-top-bar-inner">
<div id="x2-gridview-page-title" class="x2-gridview-fixed-title">
{items}{pager}'
- there must be a pager and items.
- the three opening divs with the specified classes and ids are required. The
divs
get closed after the grid header is printed.
- the X2GridView propert fixedHeader must be set to true

Registers JS which makes the grid header sticky Preconditions: - The CGridView template string must be set up in a highly specific way - Example: '<div id="x2-gridview-top-bar-outer" class="x2-gridview-fixed-top-bar-outer"> <div id="x2-gridview-top-bar-inner" class="x2-gridview-fixed-top-bar-inner"> <div id="x2-gridview-page-title" class="x2-gridview-fixed-title"> {items}{pager}' - there must be a pager and items. - the three opening divs with the specified classes and ids are required. The divs get closed after the grid header is printed. - the X2GridView propert fixedHeader must be set to true

abstract protected
# addFieldNames( )

Used to populate allFieldNames property with attribute labels indexed by attribute names.

Used to populate allFieldNames property with attribute labels indexed by attribute names.

protected
# getGvControlsColumn( mixed $width )
protected
# formatWidth( mixed $width )
protected
# getGvCheckboxColumn( mixed $width = null, array $options = array () )
protected
# extractGvSettings( )
public
# setPager( )
public
# init( )

Initializes the grid view. This method will initialize required property values and instantiate CGridView::$columns objects.

Initializes the grid view. This method will initialize required property values and instantiate CGridView::$columns objects.

Overrides

CGridView::init()
public
# generateColumnSelectorHtml( )
public
# getAfterAjaxUpdateStr( )
public
# getBeforeAjaxUpdateStr( )
public
# addToAfterAjaxUpdate( mixed $str )
public
# addToBeforeAjaxUpdate( mixed $str )
public
# run( )

Renders the view. This is the main entry of the whole view rendering. Child classes should mainly override CBaseListView::renderContent() method.

Renders the view. This is the main entry of the whole view rendering. Child classes should mainly override CBaseListView::renderContent() method.

Overrides

CBaseListView::run()
public static
# getFilterHint( )
public static
# getFilterHintText( )
public
# renderTopPager( )
public
# getMassActions( )
public
# setMassActions( mixed $massActions )
public
# renderMassActionButtons( )

Display mass actions ui buttons in top bar and set up related JS

Display mass actions ui buttons in top bar and set up related JS

public
# renderFilterHint( )
public
# renderItems( )

Renders the data items for the grid view.

Renders the data items for the grid view.

Overrides

CGridView::renderItems()
protected array
# getJSClassOptions( )

Returns

array
options to pass to grid view JS class constructor
protected
# jSClassInstantiation( )

Register JS which instantiates grid view class

Register JS which instantiates grid view class

protected
# setUpQtipManager( )

If enableQtips is true, instantiates the qtipManager prototype with configuration and prototype specified in qtipManager

If enableQtips is true, instantiates the qtipManager prototype with configuration and prototype specified in qtipManager

public
# registerClientScript( )

Registers necessary client scripts. This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Registers necessary client scripts. This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Overrides

CGridView::registerClientScript()
public
# getPossibleResultsPerPageFormatted( )
public
# renderSummary( )

Renders the summary text.

Renders the summary text.

Overrides

CBaseListView::renderSummary()
protected
# getYiiGridViewOptions( )

Code moved out of registerClientScript, allowing it to be more easily overridden This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Code moved out of registerClientScript, allowing it to be more easily overridden This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

protected
# getSortDirections( )
public
# renderTableHeader( )

Echoes the markup for the gridview's table header.

Echoes the markup for the gridview's table header.

This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Overrides

CGridView::renderTableHeader()
public
# renderFilterWithOptions( array $htmlOptions = array ()/* x2modend */ )

Like renderFilter, but with html attribute options This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Like renderFilter, but with html attribute options This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

public
# renderTitle( )
public
# renderButtons( )
protected
# renderContentBeforeHeader( )
protected
# initColumns( )

Creates column objects and initializes them. Overrides parent::initColumns, swapping hard coded reference to CDataColumn with the value of a public property.

Creates column objects and initializes them. Overrides parent::initColumns, swapping hard coded reference to CDataColumn with the value of a public property.

This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/

Overrides

CGridView::initColumns()
Methods inherited from CGridView
createDataColumn(), getFormatter(), getHasFooter(), renderDataCell(), renderFilter(), renderTableBody(), renderTableFooter(), renderTableRow(), setFormatter()
Methods inherited from CBaseListView
renderContent(), renderEmptyText(), renderPager(), renderSection()
Methods inherited from CWidget
actions(), getController(), getId(), getOwner(), getViewFile(), getViewPath(), render(), setId()
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 CGridView
FILTER_POS_BODY, FILTER_POS_FOOTER, FILTER_POS_HEADER
Properties summary
public integer $selectableRows 0
#

the number of table body rows that can be selected. If 0, it means rows cannot be selected. If 1, only one row can be selected. If 2 or any other number, it means multiple rows can be selected. A selected row will have a CSS class named 'selected'. You may also call the JavaScript function <span class="php-var">$</span>(gridID).yiiGridView(<span class="php-quote">'getSelection'</span>) to retrieve the key values of the currently selected rows (gridID is the DOM selector of the grid).

the number of table body rows that can be selected. If 0, it means rows cannot be selected. If 1, only one row can be selected. If 2 or any other number, it means multiple rows can be selected. A selected row will have a CSS class named 'selected'. You may also call the JavaScript function <span class="php-var">$</span>(gridID).yiiGridView(<span class="php-quote">'getSelection'</span>) to retrieve the key values of the currently selected rows (gridID is the DOM selector of the grid).

public string $loadingCssClass 'grid-view-loading'
#

the CSS class name that will be assigned to the widget container element when the widget is updating its content via AJAX. Defaults to 'grid-view-loading'.

the CSS class name that will be assigned to the widget container element when the widget is updating its content via AJAX. Defaults to 'grid-view-loading'.

Since

1.1.1
public mixed $viewName
#
public boolean $fullscreen false
#
public array $defaultGvSettings array ()
#
public array $updateParams array ()
#
public mixed $excludedColumns
#
public boolean $enableGvSettings true
#
public boolean $enableControls false
#
public boolean $enableCheckboxColumn true
#
public boolean $enableGridResizing true
#
public boolean $enableColDragging true
#
public boolean $enableResponsiveTitleBar true
#
public boolean $enableDbPersistentGvSettings true
#
public boolean $fixedHeader false
#
public string $summaryText
#
the summary text template for the view. These tokens are recognized and will be replaced with the corresponding values:
  • {start}: the starting row number (1-based) currently being displayed
  • {end}: the ending row number (1-based) currently being displayed
  • {count}: the total number of rows
  • {page}: the page number (1-based) current being displayed, available since version 1.1.3
  • {pages}: the total number of pages, available since version 1.1.3
the summary text template for the view. These tokens are recognized and will be replaced with the corresponding values:
  • {start}: the starting row number (1-based) currently being displayed
  • {end}: the ending row number (1-based) currently being displayed
  • {count}: the total number of rows
  • {page}: the page number (1-based) current being displayed, available since version 1.1.3
  • {pages}: the total number of pages, available since version 1.1.3
public array $buttons array()
#
public mixed $title
#
public string $gridViewJSClass 'gvSettings'
#
public boolean $ajax false
#
public boolean $evenPercentageWidthColumns false
#
public boolean $showHeader true
#
public boolean $hideFullHeader false
#
public array $possibleResultsPerPage array (10, 20, 30, 40, 50, 75, 100)
#
public boolean $hideSummary false
#
public string $pagerClass 'CLinkPager'
#

$pagerClass

$pagerClass

public boolean $enableSelectAllOnAllPages false
#

If true, the users will be able to select & perform mass action on all records
all records in the dataprovider.

If true, the users will be able to select & perform mass action on all records all records in the dataprovider.

public boolean $calculateChecksum false
#
public string $gvControlsTemplate '{view} {update} {delete}'
#

$gvControlsTemplate

$gvControlsTemplate

public string $dataColumnClass 'CDataColumn'
#

$dataColumnClass

$dataColumnClass

public boolean $enableScrollOnPageChange true
#

If true, window will automatically scroll to the top when the page is changed

If true, window will automatically scroll to the top when the page is changed

public string $afterGridViewUpdateJSString ""
#
public string $beforeGridViewUpdateJSString ""
#
public array $qtipManager
#

the JS prototype name followed by properties of that prototype

the JS prototype name followed by properties of that prototype

public boolean $enableQtips false
#

whether qtips should be used, refresh method should be defined in a JS sub
prototype of X2GridViewQtipManager

whether qtips should be used, refresh method should be defined in a JS sub prototype of X2GridViewQtipManager

protected string $_moduleName
#

$moduleName Name of the module that the grid view is being
used in, for purposes of access control.

$moduleName Name of the module that the grid view is being used in, for purposes of access control.

protected mixed $_resultsPerPage
#
protected mixed $_packages
#
protected array $allFieldNames array()
#
protected mixed $gvSettings null
#
protected mixed $columnSelectorId
#
protected mixed $columnSelectorHtml
#
protected string $_gvSettingsName
#

Set to view name if value not passed to constructor. Used to save/access
gridview settings saved as a JSON property in the profile model

Set to view name if value not passed to constructor. Used to save/access gridview settings saved as a JSON property in the profile model

protected string $_namespacePrefix
#

Used to prefix javascript namespaces, GET parameter keys, Script names, and HTML
attributes. Allows multiple instances of X2GridView to work on the same page. Generated by
whitelisting the gridview id.

Used to prefix javascript namespaces, GET parameter keys, Script names, and HTML attributes. Allows multiple instances of X2GridView to work on the same page. Generated by whitelisting the gridview id.

protected mixed $_massActions
#
Properties inherited from CGridView
$afterAjaxUpdate, $ajaxType, $ajaxUpdate, $ajaxUpdateError, $ajaxUrl, $ajaxVar, $baseScriptUrl, $beforeAjaxUpdate, $blankDisplay, $columns, $cssFile, $enableHistory, $filter, $filterCssClass, $filterPosition, $filterSelector, $hideHeader, $nullDisplay, $rowCssClass, $rowCssClassExpression, $rowHtmlOptionsExpression, $selectionChanged, $showTableOnEmpty, $updateSelector
Properties inherited from CBaseListView
$dataProvider, $emptyCssClass, $emptyTagName, $emptyText, $enablePagination, $enableSorting, $htmlOptions, $itemsCssClass, $pager, $pagerCssClass, $summaryCssClass, $summaryTagName, $tagName, $template
Properties inherited from CWidget
$actionPrefix, $skin
Magic properties inherited from CGridView
$formatter, $hasFooter
Magic properties inherited from CWidget
$controller, $id, $owner, $viewPath
X2CRM Documentation API documentation generated by ApiGen 2.8.0