include/SugarObjects/VardefManager.php

Show: inherited
Table of Contents

\VardefManager

Package: SugarCRM

Vardefs management

Api
 

Properties

Propertypublic  $custom_disabled_modules= 'array()'
static
Default valuearray()Details
Type
n/a
Propertypublic  $linkFields= ''
static
Details
Type
n/a

Methods

methodpublic_clearCache( string $module_dir = '', string $object_name = '' ) : void
static

PRIVATE function used within clearVardefCache so we do not repeat logic

Parameters
Name Type Description
$module_dir string

module_dir the module_dir to clear

$object_name string

object_name the name of the object we are clearing this is for sugar_cache

methodpublicaddTemplate(  $module,  $object,  $template,  $object_name = false ) : void
static

Parameters
Name Type Description
$module
$object
$template
$object_name
methodpublicapplyGlobalAccountRequirements( Array $vardef ) : Array
static

applyGlobalAccountRequirements

This method ensures that the account_name relationships are set to always be required if the configuration file specifies so. For more information on this require_accounts parameter, please see the administrators guide or go to the developers.sugarcrm.com website to find articles relating to the use of this field.

Parameters
Name Type Description
$vardef Array

The vardefs of the module to apply the account_name field requirement to

Returns
Type Description
Array $vardef The vardefs of the module with the updated required setting based on the system configuration
methodpubliccleanVardefs( Array $fieldDefs ) : Array
static

Remove invalid field definitions

Parameters
Name Type Description
$fieldDefs Array
Returns
Type Description
Array
Details
Static
 
methodpublicclearVardef( string $module_dir = '', string $object_name = '' ) : void
static

clear out the vardef cache. If we receive a module name then just clear the vardef cache for that module otherwise clear out the cache for every module

Parameters
Name Type Description
$module_dir string

module_dir the module_dir to clear, if not specified then clear clear vardef cache for all modules.

$object_name string

object_name the name of the object we are clearing this is for sugar_cache

methodpubliccreateVardef(  $module,  $object,  $templates = array('default'),  $object_name = false ) : void
static

this method is called within a vardefs.php file which extends from a SugarObject.

It is meant to load the vardefs from the SugarObject.

Parameters
Name Type Description
$module
$object
$templates
$object_name
methodpublicgetLinkFieldForRelationship(  $module,  $object,  $relName ) : void
static

Parameters
Name Type Description
$module
$object
$relName
methodprotectedgetLinkFieldsForModule(  $module,  $object ) : array | bool
static

Parameters
Name Type Description
$module
$object
Returns
Type Description
array | bool returns a list of all fields in the module of type 'link'.
Details
Static
 
methodpublicgetLinkedModulesFromFormula( \SugarBean $focus, String $formula ) : array
static

Parameters
Name Type Description
$focus \SugarBean
$formula String
Returns
Type Description
array of related modules used in the formula
Details
Static
 
methodpublicloadVardef( string $module, string $object, bool $refresh = false,  $params = array() ) : void
static

load the vardefs for a given module and object

Parameters
Name Type Description
$module string

the given module we want to load the vardefs for

$object string

the given object we wish to load the vardefs for

$refresh bool

whether or not we wish to refresh the cache file.

$params
methodpublicmodHasCalcFieldsWithLink(  $module,  $object,  $linkName ) : bool
static

Parameters
Name Type Description
$module
$object
$linkName
Returns
Type Description
bool return true if the module contains calculated fields with the specified link in the formula.
Details
Static
 
methodpublicrefreshVardefs( string $module, string $object, array $additional_search_paths = null,  $cacheCustom = true,  $params = array() ) : void
static

Given a module, search all of the specified locations, and any others as specified in order to refresh the cache file

Parameters
Name Type Description
$module string

the given module we want to load the vardefs for

$object string

the given object we wish to load the vardefs for

$additional_search_paths array

an array which allows a consumer to pass in additional vardef locations to search

$cacheCustom
$params
methodpublicsaveCache( string $module, string $object,  $additonal_objects = array() ) : void
static

Save the dictionary object to the cache

Parameters
Name Type Description
$module string

the name of the module

$object string

the name of the object

$additonal_objects
methodpublicsetCustomAllowedForModule( String $module, Boolean $enable ) : null
static

Enables/Disables the loading of custom vardefs for a module.

Parameters
Name Type Description
$module String

Module to be enabled/disabled

$enable Boolean

true to enable, false to disable

Returns
Type Description
null
methodprotectedupdateRelCFModules( \$module $module, \$object $object ) : bool
static

Parameters
Name Type Description
$module \$module

String name of module.

$object \$object

String name of module Bean. Updates a list of link fields which have relationships to modules with calculated fields that use this module. Needed to cause an update to those modules when this module is updated.

Returns
Type Description
bool
Details
Static
 
Documentation was generated by DocBlox 0.18.1.