include/SubPanel/SubPanelDefinitions.php

Show: inherited
Table of Contents

\SubPanelDefinitions

Package:

Properties

Propertypublic  $_focus= ''
Details
Type
n/a
Propertypublic  $_visible_tabs_array= ''
Details
Type
n/a
Propertypublic  $layout_defs= ''
Details
Type
n/a
Propertypublic  $panels= ''
Details
Type
n/a

Methods

methodpublicSubPanelDefinitions( \BEAN $focus, STRING $layout_def_key = '', ARRAY $layout_def_override = '' ) : \SubPanelDefinitions

Enter description here...

Parameters
Name Type Description
$focus \BEAN
  • this is the bean you want to get the data from
$layout_def_key STRING
  • if you wish to use a layout_def defined in the default metadata/subpaneldefs.php that is not keyed off of $bean->module_dir pass in the key here
$layout_def_override ARRAY
  • if you wish to override the default loaded layout defs you pass them in here.
Returns
Type Description
\SubPanelDefinitions
methodpublicexclude_tab(  $tab_name ) : void

Removes a tab from the list of loaded tabs.

Returns true if successful, false otherwise. Hint: Used by Campaign's DetailView.

Parameters
Name Type Description
$tab_name
methodpublicget_all_subpanels(  $return_tab_modules_only = true,  $group_by_module = false ) : void

return all available subpanels that belong to the list of tab modules. You can optionally return all available subpanels, and also optionally group by module (prepends the key with the bean class name).

Parameters
Name Type Description
$return_tab_modules_only
$group_by_module
methodpublicget_available_tabs( boolean $FromGetModuleSubpanels = false ) : array

This function returns an ordered list of all "tabs", actually subpanels, for this module The source list is obtained from the subpanel layout contained in the layout_defs for this module, found either in the modules metadata/subpaneldefs.php file, or in the modules custom/.../Ext/Layoutdefs/layoutdefs.ext.php file and filtered through an ACL check.

Note that the keys for the resulting array of tabs are in practice the name of the underlying source relationship for the subpanel So for example, the key for a custom module's subpanel with Accounts might be 'one_one_accounts', as generated by the Studio Relationship Editor Although OOB module subpanels have keys such as 'accounts', which might on the face of it appear to be a reference to the related module, in fact 'accounts' is still the relationship name

Parameters
Name Type Description
$FromGetModuleSubpanels boolean

Optional - include the subpanel title label in the return array (false)

Returns
Type Description
array All tabs that pass an ACL check
methodpublicget_hidden_subpanels( ) : void

methodpublicload_subpanel( string $name, boolean $reload = false, boolean $original_only = false ) : boolean | \aSubPanel

Load the definition of the a sub-panel.

Also the sub-panel is added to an array of sub-panels. use of reload has been deprecated, since the subpanel is initialized every time.

Parameters
Name Type Description
$name string

The name of the sub-panel to reload

$reload boolean

Reload the sub-panel (unused)

$original_only boolean

Only load the original sub-panel and no custom ones

Returns
Type Description
boolean | \aSubPanel Returns aSubPanel object or boolean false if one is not found or it can't be displayed due to ACL reasons.
methodpublicopen_layout_defs(  $reload = false,  $layout_def_key = '',  $original_only = false ) : void

Load the layout def file and associate the definition with a variable in the file.

Parameters
Name Type Description
$reload
$layout_def_key
$original_only
methodpublicset_hidden_subpanels(  $panels ) : void

Parameters
Name Type Description
$panels

\aSubPanel

Package: SugarCRM

Subpanel implementation

Api
 

Properties

Propertypublic  $_instance_properties= ''
Details
Type
n/a
Propertypublic  $bean_name= ''
Details
Type
n/a
Propertypublicbool  $canDisplay= 'true'

Can we display this subpanel?

This is set after it loads the def's for the subpanel. If there are no beans to display in the collection we don't want to display this as it will just throw errors.

Default valuetrueDetails
Type
bool
Propertypublic  $db_fields= ''
Details
Type
n/a
Propertypublic  $mod_strings= ''
Details
Type
n/a
Propertypublic  $name= ''
Details
Type
n/a
Propertypublic  $panel_definition= ''
Details
Type
n/a
Propertypublic  $parent_bean= ''
Details
Type
n/a
Propertypublic  $sub_subpanels= ''
Details
Type
n/a
Propertypublic  $table_name= ''
Details
Type
n/a
Propertypublic  $template_instance= ''
Details
Type
n/a

Methods

methodpublic_to_array( ) : void

Returns an array of current properties of the class.

It will simply give the class name for instances of classes.

methodpublicaSubPanel(  $name,  $instance_properties,  $parent_bean,  $reload = false,  $original_only = false ) : void

Parameters
Name Type Description
$name
$instance_properties
$parent_bean
$reload
$original_only
methodpublicdistinct_query( ) : void

methodprotectedgetDisplayFieldsFromCollection(  $sub_subpanels ) : void

Parameters
Name Type Description
$sub_subpanels
methodpublicget_buttons( ) : void

methodpublicget_data_source_name(  $check_set_subpanel_data = false ) : void

Parameters
Name Type Description
$check_set_subpanel_data
methodpublicget_def_prop_value(  $name ) : void

Parameters
Name Type Description
$name
methodpublicget_function_parameters( ) : void

methodpublicget_header_panel_def( ) : void

methodpublicget_inst_prop_value(  $name ) : void

Parameters
Name Type Description
$name
methodpublicget_list_fields( ) : void

methodpublicget_module_name( ) : void

methodpublicget_name( ) : void

methodpublicget_title( ) : void

methodpublicget_where( ) : void

methodpublicisCollection( ) : bool

Test to see if the sub panels defs contain a collection

Returns
Type Description
bool
methodpublicisDatasourceFunction( ) : void

methodpublicisDefaultHidden( ) : bool

is the sub panel default hidden?

Returns
Type Description
bool
methodpublicis_fill_in_additional_fields( ) : void

methodpublicload_module_info( ) : void

methodpublicload_sub_subpanels( ) : bool

Load the Sub-Panel objects if it can from the metadata files.

call this function for sub-panels that have unions.

Returns
Type Description
bool True by default if the subpanel was loaded. Will return false if none in the collection are allowed by the current user.
Documentation was generated by DocBlox 0.18.1.