Class CWidget
CWidget is the base class for widgets.
A widget is a self-contained component that may generate presentation based on model data. It can be viewed as a micro-controller that embeds into the controller-managed views.
Compared with CController controller, a widget has neither actions nor filters.
Usage is described at CBaseController
and CBaseController::widget()
.
- CComponent
- CBaseController
- CWidget
Direct known subclasses
CActiveForm, CBaseListView, CJuiWidget, CMenu, CPortlet, CTabView, CTreeView, DateRangeInputsWidget, ProfileDashboardManager, ProfileLayoutEditor, X2Widget, CBasePager, CBreadcrumbs, CCaptcha, CClipWidget, CDetailView, CFilterWidget, CFlexWidget, CInputWidgetIndirect known subclasses
AccountsGridViewProfileWidget, ActionActiveForm, CallsWidget, PublisherWidget, QuickContact, QuotesGridViewProfileWidget, QuotesWidget, RecentItems, RecordAliasesWidget, RecordIndexListView, RecordView, RecordViewLayoutManager, RecordViewWidgetManager, CContentDecorator, Reminders, ServicesGridViewProfileWidget, ServiceWebFormDesigner, SmallCalendar, SocialForm, SortableWidget, SortableWidgetManager, SortableWidgets, TagCloud, TemplatesGridViewProfileWidget, CGridView, TimeActiveForm, TimeZone, TopContacts, TopicsListView, TopSites, TransactionalViewWidget, TwitterFeed, TwitterFeedWidget, TwoColumnSortableWidgetManager, UsersChartProfileWidget, ChartWidget, WebActivityWidget, WebFormDesigner, WebLeadFormDesigner, WorkflowStageDetailsWidget, X2ActiveForm, X2ActiveGridView, X2ActiveGridViewForSortableWidgets, X2ConditionList, X2GridView, X2GridViewBase, ChatBox, X2GridViewForSortableWidgets, X2GridViewGeneric, X2LeadsGridViewProfileWidget, X2ListView, X2ModelConversionWidget, X2PillBox, X2ProgressBar, X2StarRating, X2WidgetList, CHtmlPurifier, CJuiAccordion, CJuiAutoComplete, CJuiButton, CJuiDatePicker, ActionActiveFormBase, CJuiDialog, CJuiDraggable, CJuiDroppable, CJuiInputWidget, CJuiProgressBar, CJuiResizable, CJuiSelectable, CJuiSlider, CJuiSliderInput, CJuiSortable, ActionMenu, CJuiTabs, CLinkPager, CListPager, CListView, CMarkdown, CMaskedTextField, CMultiFileUpload, CommentsWidget, ContactMapInlineTags, ContactsGridViewProfileWidget, ActionsGridViewProfileWidget, COutputCache, COutputProcessor, CronForm, CStarRating, CTextHighlighter, DetailView, DocsGridViewProfileWidget, DocViewer, DocViewerProfileWidget, EmailProgressControl, ActionsWidget, EmailsWidget, EventActiveForm, EventsChartProfileWidget, EventsWidget, FileUploader, FormView, GridViewWidget, History, IframeWidget, InlineActionForm, ActiveDateRangeInput, InlineEmailForm, InlineQuotes, InlineRelationshipsGridView, InlineRelationshipsWidget, InlineTagsWidget, LeftWidget, LoggedTimeWidget, MarketingGridViewProfileWidget, MediaBox, MediaSelector, Attachments, MenuList, MessageBox, MobileActiveForm, MobileActivityFeedListView, MobileCaptcha, MobileFormLayoutRenderer, MobileLayoutRenderer, MobileRecordIndexPager, MobileTopicsPager, MobileViewLayoutRenderer, CalendarEventActiveForm, ModelFileUploader, MultiTypeAutocomplete, NewWebLeadsGridViewProfileWidget, NoteActiveForm, NoteBox, OnlineUsers, OpportunitiesGridViewProfileWidget, Panel, ProfileGridViewWidget, ProfileInfo, CallActiveForm, ProfilesGridViewProfileWidget, Publisher, PublisherActionTab, PublisherCalendarEventTab, PublisherCallTab, PublisherCommentTab, PublisherEventTab, PublisherSmallCalendarEventTab, PublisherTab, PublisherTimeTabCopyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/web/widgets/CWidget.php
public static
array
|
#
actions( )
Returns a list of actions that are used by this widget. The structure of this
method's return value is similar to that returned by |
public
|
|
public
|
|
public
string
|
|
public
|
|
public
|
|
public
|
#
init( )
Initializes the widget. This method is called by |
public
|
|
public
string
|
#
getViewPath( boolean $checkTheme = false )
Returns the directory containing the view files for this widget. The default implementation returns the 'views' subdirectory of the directory containing the widget class file. If $checkTheme is set true, the directory "ThemeID/views/ClassName" will be returned when it exists. |
public
string
|
#
getViewFile( string $viewName )
Looks for the view script file according to the view name. This method will
look for the view under the widget's getViewPath viewPath. The view
script file is named as "ViewName.php". A localized view file may be returned if
internationalization is needed. See |
public
string
|
beginCache(),
beginClip(),
beginContent(),
beginWidget(),
createWidget(),
endCache(),
endClip(),
endContent(),
endWidget(),
renderFile(),
renderInternal(),
widget()
|
public
string
|
$actionPrefix |
|
#
the prefix to the IDs of the |
public
mixed
|
$skin | 'default' |
#
the name of the skin to be used by this widget. Defaults to 'default'. If this is set as false, no skin will be applied to this widget. |
public
|
$owner |
#
Owner/creator of this widget. It could be either a widget or a controller. |
public
string
|
$id |
#
Id of the widget. |
public
|
$controller |
#
The controller that this widget belongs to. |
public
string
|
$viewPath |
#
The directory containing the view files for this widget. |