include/Expressions/DependencyManager.php

Show: inherited
Table of Contents

\DependencyManager

Package: SugarCRM

Dependent field manager

Api
 

Properties

Propertypublic  $default_trigger= '"true"'
static
Default value"true"Details
Type
n/a

Methods

methodpublicgetCalculatedFieldDependencies(  $fields, Boolean $includeReadOnly = true, Boolean $orderMatters = false ) : \array<Dependency>
static

Returns a new Dependency that will power the provided calculated field.

Parameters
Name Type Description
$fields
$includeReadOnly Boolean

include the read-only actions to ensure calculated fields are not modified by the user in edit views. These are not required on detail/list views

$orderMatters Boolean

Order matters on views with multiple calculated fields that rely on each-other. If all the values are currently up to date, order doesn't matter.

Returns
Type Description
\array<Dependency>
methodpublicgetDependenciesForFields(  $fields,  $view = "" ) : void
static

Parameters
Name Type Description
$fields
$view
methodpublicgetDependenciesForView( array $viewdef, string $view = "", string $module = "" ) : \array<Dependency>
static

Returns a full set of the SugarLogic Dependencies to drive the business logic for a given view.

Parameters
Name Type Description
$viewdef array

view metadata (editviewdefs, detailviewdefs, ect)

$view string

name of view and its form element ("EditView", "DetailView", "QuickCreate", ect)

$module string

Primary module for this view

Returns
Type Description
\array<Dependency>
Details
Static
 
methodpublicgetDependentFieldDependencies( array $fields ) : \array<Dependency>
static

Used to get a set of Dependencies to drive the dependent fields for this module.

Parameters
Name Type Description
$fields array

fielddef array to create the dependencies from

Returns
Type Description
\array<Dependency>
Details
Static
 
methodpublicgetDependentFieldTriggerFields( array $fields,  $fieldDefs = array() ) : \array<Dependency>
static

Used to get a set of Dependencies to drive the dependent fields for this module.

Parameters
Name Type Description
$fields array

fielddef array to create the dependencies from

$fieldDefs
Returns
Type Description
\array<Dependency>
Details
Static
 
methodpublicgetDropDownDependencies( array $fields ) : \array<Dependency>
static

Used to get a set of Dependencies to drive the Dependent Dropdown fields for this module.

Parameters
Name Type Description
$fields array

fielddef array to create the dependencies from

Returns
Type Description
\array<Dependency>
Details
Static
 
methodpublicgetJSUserVariables( \$user $user ) : string
static

Parameters
Name Type Description
$user \$user

User, user to return SugarLogic variables for

Returns
Type Description
string
Details
Static
 
methodpublicgetLinkFields( \$fields $fields, \$view $view ) : string
static

Parameters
Name Type Description
$fields \$fields

array, field_defs for this view

$view \$view

string, name of view (form name)

Returns
Type Description
string
Details
Static
returns the javascript for the link variables of this view.  
methodpublicgetModuleDependenciesForAction( string $module, string $action, string $form = "EditView" ) : \array<Dependency>
static

Returns the set of the custom SugarLogic Dependencies defined in the dependency metadata for a module that are valid for the given action.

Parameters
Name Type Description
$module string

Primary module for this action

$action string

name of the action to get dependencies for ("edit", "view", "save", ect)

$form string

name of the form element used on html forms

Returns
Type Description
\array<Dependency>
Details
Static
 
methodprivategetModuleDependencyMetadata(  $module ) : void
static

Parameters
Name Type Description
$module
methodpublicgetPanelDependency(  $panel_id,  $dep_expression ) : \array<Dependency>
static

Used to get a set of Dependencies to drive the dependent panels for this module.

Parameters
Name Type Description
$panel_id
$dep_expression
Returns
Type Description
\array<Dependency>
Details
Static
 
methodprotectedorderCalculatedFields(  $deps,  $formulaFields ) : void
static

Parameters
Name Type Description
$deps
$formulaFields
methodprotectedupdateWeights(  $weights,  $updated,  $formulaFields,  $field ) : void
static

Parameters
Name Type Description
$weights
$updated
$formulaFields
$field
methodprotectedvalidLinkField( \$def $def ) : bool
static

Used internally to determine if a field def is a valid link for use in formulas

Parameters
Name Type Description
$def \$def

array, Link field definition.

Returns
Type Description
bool true if field is valid.
Details
Static
 
Documentation was generated by DocBlox 0.18.1.