include/DashletContainer/Containers/DCMenu.php

Show: inherited
Table of Contents

\DCMenu

Package:

This class provides the base implementation of the DashletContainer. It handles the passing of data to the DCMetaDataParser. The DCMetaDataParser loads and stores meta-data shared between all Dashlet Container Layouts.

This information includes which Dashlets are avaialble and basic grouping and positioning. This allows for switching between Dashlet Container Layouts and a basic preservation of the Layouts. Each DashletContainer may also store their own custom meta-data specifying DashletContainer specific layout information

Parent(s)
\DashletContainer
Author
mitani  

Properties

Propertyprivate\SugarBean  $focus= 'null'
inherited

The focus bean that is utilized by dashlets

focusInherited from: \DashletContainer::$$focus
Default valuenullDetails
Type
\SugarBean
Inherited_from
\DashletContainer::$$focus  
Propertyprivate\GUID  $id= 'null'
inherited

Id of the current container

IDInherited from: \DashletContainer::$$id
Default valuenullDetails
Type
\GUID
Inherited_from
\DashletContainer::$$id  
Propertyprotected\DCMetaDataParser  $metaDataParser= 'null'
inherited

Instance of the DCMetaDataParser

metaDataParserInherited from: \DashletContainer::$$metaDataParser
Default valuenullDetails
Type
\DCMetaDataParser
Inherited_from
\DashletContainer::$$metaDataParser  

Methods

methodpublic__construct( ) : void
inherited

Constructor of DashletContainer. It will also instantiate the metaDataParser and layout

Inherited from: \DashletContainer::__construct()
methodpublicaddDashlet( \GUID $dashletID, \GUID $group, int $position, \Associative $layoutParams = null ) : bool
inherited

This function allows for adding a dashlet to a layout.

Inherited from: \DashletContainer::addDashlet()

It calls on DCMetaDataParser for adding the dashlet to the DashletContainer meta-data (allowing for the same dashlets to be rendered between different DashletContainers)

Parameters
Name Type Description
$dashletID \GUID
  • id of the dashlet (not the instance id of the dashlet)
$group \GUID
  • id of the group to add the dashlet to
$position int
  • position in the group to add the dashlet to
$layoutParams \Associative

Array $layoutParams - any layout params for the Dashlet Container Layout

Returns
Type Description
bool - success or failure of add
methodpublicgetAJAXResponse( ) : \JSON
inherited

Responds to any AJAX response made by JSDCManager.

Inherited from: \DashletContainer::getAJAXResponse()

It expects requests in the following format

array( 'dashlets'=>array( 'dashlet1-id'=>array('method'=>function to call on, 'data'=>data to pass into the function), 'dashlet2-id'=>array('method'=>function to call on, 'data'=>data to pass into the function), ... ) )

It will return the data in the following format

array( 'dashlets'=> array( 'dashlet1-id'=> response 'dashlet2-id'=>response ... ) 'DCM'=>array( 'status'=>200 - uses sames responses as HTML status response 'response'=> string or array of data for Dashlet Container Manager to process on the JS side

)

)

Returns
Type Description
\JSON Data
methodprotectedgetDynamicMenuItem(  $def ) : void

Parameters
Name Type Description
$def
methodpublicgetID( ) : \GUID
inherited

Returns the containers ID

Inherited from: \DashletContainer::getID()
Returns
Type Description
\GUID id
methodpublicgetLayout( ) : \Associative

Returns an associative array containing the HTML code as well as any JS files that need to be loaded in order to render the container. If there is a function to call onload it should be handled inside one of the JS files using the YUI Event Handler

Returns
Type Description
\Associative Array ('html'=>html code , 'jsfiles'=>array('js1', 'js2', ...));
methodprotectedgetMenuItem(  $module ) : void

Parameters
Name Type Description
$module
methodpublicgetMenus( ) : array

Returns
Type Description
array
methodpublicgetNotifications( ) : void

methodpublicgetPartnerIconMenus( ) : array

Get the partner icon menus that are displayed in the bottom right footer.

Returns
Type Description
array
methodpublicgetScript( ) : void

methodpublicgetSearchIcon( ) : void

methodpublicmoveDashlet( \GUID $id, \GUID $group, int $position, \Associative $layoutParams = null ) : bool
inherited

Moves a dashlet from one position to another in a Dashlet Contianer and it's respective Dashlet Container Layout

Inherited from: \DashletContainer::moveDashlet()
Parameters
Name Type Description
$id \GUID
  • id of the Dashlet instance to move
$group \GUID
  • group to move it to
$position int
  • position in the group to move it to
$layoutParams \Associative

Array $layoutParams - any layout params to be passed to the Dashely Container Layout

Returns
Type Description
bool - success or failure of move
methodpublicremoveDashlet( \GUID $id, \Associative $layoutParams = null ) : bool
inherited

Removes a dashlet from a Dashlet Container and the respective Dashlet Container Layout.

Inherited from: \DashletContainer::removeDashlet()
Parameters
Name Type Description
$id \GUID
  • id of the Dashlet instance to remove
$layoutParams \Associative

Array $layoutParams - any layout params specific to this DashletContainer

Returns
Type Description
bool - success or failure of remove
methodpublicsetFocusBean( \SugarBean $bean ) : void
inherited

Sets the focus bean for the container

Inherited from: \DashletContainer::setFocusBean()
Parameters
Name Type Description
$bean \SugarBean
  • the primary focus bean to be used in the Dashlet Container
Documentation was generated by DocBlox 0.18.1.