Class SortableWidget
Base widget class for all of the profile widgets
- CComponent
- CBaseController
- CWidget
- X2Widget
- SortableWidget
Direct known subclasses
ChartWidget, DocViewerProfileWidget, GridViewWidget, IframeWidget, InlineTagsWidget, PublisherWidget, TwitterFeedWidget, WorkflowStageDetailsWidgetIndirect known subclasses
AccountsGridViewProfileWidget, ActionsGridViewProfileWidget, InlineRelationshipsWidget, LoggedTimeWidget, MarketingGridViewProfileWidget, NewWebLeadsGridViewProfileWidget, OpportunitiesGridViewProfileWidget, ProfileGridViewWidget, ProfilesGridViewProfileWidget, QuotesGridViewProfileWidget, QuotesWidget, ServicesGridViewProfileWidget, ActionsWidget, TemplatesGridViewProfileWidget, TransactionalViewWidget, UsersChartProfileWidget, WebActivityWidget, X2LeadsGridViewProfileWidget, CallsWidget, CommentsWidget, ContactsGridViewProfileWidget, DocsGridViewProfileWidget, EmailsWidget, EventsChartProfileWidget, EventsWidgetPackage: application\components\sortableWidget
Located at x2engine/protected/components/sortableWidget/SortableWidget.php
public static
|
#
getParentType( mixed $widgetType )
Used for situations where widget type should resolve to parent type (e.g for module-specific record view layouts) |
public static
|
#
getPathAlias( string $widgetType )
Returns path alias of directory that contains widgets of the specified type |
public static
string
|
|
public static
|
|
public static
|
|
public static
array
|
|
public static
|
#
getWidgetContents( object $controller, object $profile, string $widgetType, array $widgetUID, mixed $extraWidgetParams = array () )
Used to render a widget and its associated scripts during an AJAX request |
public static
|
|
public static
|
#
instantiateWidget( string $widgetLayoutKey, object $profile, mixed $widgetType = 'profile', mixed $options = array() )
Instantiates the widget |
public static
array
|
|
public static
array
|
#
createSortableWidget( object $profile, string $widgetClass, string $widgetType, array $widgetSettings = array () )
|
public static
boolean
|
#
deleteSortableWidget( object $profile, string $widgetClass, string $widgetUID, string $widgetLayoutName )
|
public static
|
#
setSortOrder( object $profile, array $widgetOrder, string $widgetType )
Sets the order of widgets specified in the widget layout JSON property of the Profile model |
public static
boolean
|
#
setJSONProperties( object $profile, array $props, string $widgetType, mixed $widgetUID )
Sets the values of a properties, for the current widget class, of the widget layout JSON object. |
public static
mixed
|
#
getJSONProperty( object $profile, string $key, string $widgetType, mixed $widgetUID )
Retrieves the value of a property, for the current widget class, of the widget layout JSON object. |
public static
mixed
|
#
getJSONProperties( object $profile, string $widgetType, string $widgetUID )
Retrieves the value of a property, for the current widget class, of the widget layout JSON object. |
public
string
|
|
public
|
|
public
|
|
public
|
#
setWidgetProperties( array $props )
Non-static wrapper around setJSONProperties which caches the property value for getWidgetProperty () |
public
|
#
setWidgetProperty( string $key, string $value )
Non-static wrapper around setJSONProperty which caches the property value for getWidgetProperty () |
public
string
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
|
public
|
|
public
|
|
public
array
|
#
getViewFileParams( )
Magic getter. Returns an array of parameters which should be passed to the
view file associated with this |
public
|
|
public
|
|
public
|
#
renderWidget( )
Renders widget components by parsing the template string and calling rendering methods for each template item. HTML contained in the template gets echoed out. |
public
|
|
public
|
|
public
|
#
renderWidgetContents( )
Renders widget contents contained in the view file pointed to by the viewFile property. This gets called if {widgetContents} is contained in the template string. |
public
|
|
public
|
#
renderWidgetLabel( )
Renders the widget label saved in the profile JSON widget settings property This gets called if {widgetLabel} is contained in the template string. |
public
|
#
renderSettingsMenu( )
Renders the show/hide settings menu icon as well as the settings menu content |
public
|
#
renderMinimizeButton( )
Renders a button which allows the user to minimize/maximize the widget. This gets called if {minimizeButton} is contained in the template string. |
public
|
#
renderCloseButton( )
Renders a button which allows the user to hide/show the widget. This gets called if {closeButton} is contained in the template string. |
public
|
|
protected
|
#
getSettingsMenuContent( )
Override in child class. This content will be turned into a popup dropdown menu with the PopupDropdownMenu JS prototype. |
protected
string
|
|
protected
string
|
|
public
|
|
protected
array
|
|
protected
array
|
|
protected
array
|
|
protected
|
|
public
|
__construct(),
ajaxRender(),
behaviors(),
getModule(),
renderFile(),
setModule()
|
actions(),
getController(),
getId(),
getOwner(),
getViewFile(),
getViewPath(),
render(),
setId()
|
beginCache(),
beginClip(),
beginContent(),
beginWidget(),
createWidget(),
endCache(),
endClip(),
endContent(),
endWidget(),
renderInternal(),
widget()
|
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
string |
PROFILE_WIDGET_PATH_ALIAS
|
'application.components.sortableWidget.profileWidgets' |
|
string |
RECORD_VIEW_WIDGET_PATH_ALIAS
|
'application.components.sortableWidget.recordViewWidgets' |
public static
boolean
|
$createByDefault | true |
|
public static
boolean
|
$canBeCreated | true |
|
public
string
|
$widgetType |
|
#
The type of widget that this is (profile). This value is used to detect
the The shared view file must have the following name: The profile model widget layout JSON property must have the following name |
public
|
$widgetManager |
|
#
$widgetManager |
public
string
|
$sortableWidgetJSClass | 'SortableWidget' |
#
JS class which is used to manage the front-end behavior of this widget. This
is |
public
mixed
|
$defaultTitle |
|
|
public
string
|
$widgetUID | '' |
#
Used to distinguish widget clones from eachother |
public
string
|
$info | '' |
#
A description of the widget |
public
object
|
$profile |
|
#
The profile model associated with the widget |
public
boolean
|
$isAjaxRequest | false |
#
Set to true when the current request is an ajax request |
public
string
|
$viewFile | '' |
#
The name of the view file containing the widget contents |
public
boolean
|
$relabelingEnabled | false |
#
If true, the widget can be relabeled by the user from the widget settings menu |
public
boolean
|
$canBeDeleted | false |
#
If true, the widget can be deleted by the user from the widget settings menu |
public
string
|
$template | '<div class="submenu-title-bar widget-title-bar">{widgetLabel}{closeButton}{minimizeButton}</div>{widgetContents}' |
#
A mixture of html and attributes inside curly braces. This gets used by renderWidget to render widget elements specified in child classes. As with X2GridView, each attribute inside curly braces should have a corresponding method called render<attribute_name>. |
protected
array
|
$_JSSortableWidgetParams |
|
#
properties which will get passed to the constructor of the JS
SortableWidget |
protected
array
|
$_translations |
|
#
translations to be passed along with $_JSSortableWidgetParams to the JS
Sortable |
protected
string
|
$containerClass | 'sortable-widget-container x2-layout-island' |
#
CSS class to be added to the container element |
protected
mixed
|
$_packages |
|
#
Packages which will be registered when the widget content gets rendered. |
protected
string
|
$_setupScript |
|
#
This script gets registered when the widget content gets rendered. |
protected
string
|
$_sharedCss |
|
#
This css gets registered when the widget container gets rendered. |
protected
string
|
$_css |
|
#
This css gets registered when the widget content gets rendered. |
protected
array
|
$_viewFileParams |
|
#
Parameters to be passed to the specified view file referred to by the
property |
protected
string
|
$_sharedViewFile |
|
#
The name of the view file shared by all widgets of a certain type. This is
the |
protected
array
|
$_settingsFormFields |
|
|
protected
mixed
|
$_sharedCssFileNames |
|
#
Returns paths of shared css files relative to themes/x2engine/css. |
$_module
|
$actionPrefix,
$skin
|
$module
|
$controller,
$id,
$owner,
$viewPath
|