include/SubPanel/SubPanelDefinitions.php
\SubPanelDefinitions
Properties
Methods
SubPanelDefinitions(
\BEAN $focus, STRING $layout_def_key
=
'', ARRAY $layout_def_override
=
''
)
:
\SubPanelDefinitions
Enter description here...
Name | Type | Description |
---|---|---|
$focus | \BEAN |
|
$layout_def_key | STRING |
|
$layout_def_override | ARRAY |
|
Type | Description |
---|---|
\SubPanelDefinitions |
exclude_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.
Name | Type | Description |
---|---|---|
$tab_name |
get_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).
Name | Type | Description |
---|---|---|
$return_tab_modules_only | ||
$group_by_module |
get_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
Name | Type | Description |
---|---|---|
$FromGetModuleSubpanels | boolean | Optional - include the subpanel title label in the return array (false) |
Type | Description |
---|---|
array | All tabs that pass an ACL check |
load_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.
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 |
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. |
\aSubPanel
Subpanel implementation
- Api
Properties
bool
$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.
true
Details- Type
- bool
Methods
_to_array(
)
:
void
Returns an array of current properties of the class.
It will simply give the class name for instances of classes.
aSubPanel(
$name, $instance_properties, $parent_bean, $reload
=
false, $original_only
=
false
)
:
void
Name | Type | Description |
---|---|---|
$name | ||
$instance_properties | ||
$parent_bean | ||
$reload | ||
$original_only |
getDisplayFieldsFromCollection(
$sub_subpanels
)
:
void
Name | Type | Description |
---|---|---|
$sub_subpanels |
get_data_source_name(
$check_set_subpanel_data
=
false
)
:
void
Name | Type | Description |
---|---|---|
$check_set_subpanel_data |
isCollection(
)
:
bool
Test to see if the sub panels defs contain a collection
Type | Description |
---|---|
bool |