include/SugarDependentDropdown/SugarDependentDropdown.php

Show: inherited
Table of Contents

\SugarDependentDropdown

Package:

Properties

Propertypublic  $alwaysMerge= 'array( 'force_render', )'

Fields that will be merged down into individual elements and handlers

Default valuearray( 'force_render', )Details
Type
n/a
Propertypublic  $debugMode= 'false'
Default valuefalseDetails
Type
n/a
Propertypublic  $defaults= 'array( 'name' => '', 'id' => '', 'type' => 'none', // form element, valid "select", "input", "checkbox", "none" 'label_pos' => 'left', // valid: 'left', 'right', 'top', 'bottom', 'none' (none) 'hidden' => array(), // metadata to create hidden fields with values you choose )'
Default valuearray( 'name' => '', 'id' => '', 'type' => 'none', // form element, valid "select", "input", "checkbox", "none" 'label_pos' => 'left', // valid: 'left', 'right', 'top', 'bottom', 'none' (none) 'hidden' => array(), // metadata to create hidden fields with values you choose )Details
Type
n/a
Propertypublic  $elementRequired= 'array( 'name', 'id', //'values', //'onchange', //'force_render', )'
Default valuearray( 'name', 'id', //'values', //'onchange', //'force_render', )Details
Type
n/a
Propertypublic  $metadata= ''
Details
Type
n/a
Propertypublic  $validTypes= 'array( "select", // select dropdown "input", // text input field "checkbox", // checkbox (radio buttons will not be supported) "none", // blank "multiple" // custom functionality )'
Default valuearray( "select", // select dropdown "input", // text input field "checkbox", // checkbox (radio buttons will not be supported) "none", // blank "multiple" // custom functionality )Details
Type
n/a

Methods

methodpublicSugarDependentDropdown( string $metadata = '' ) : void

Sole constructor

Parameters
Name Type Description
$metadata string

Path to metadata file to consume

methodpublicdebugOutput(  $v ) : void

Prints debug messages to the screen

Parameters
Name Type Description
$v

mixed

methodpublicinit( string $metadata ) : void

Prepares an instance of SDD for use with a given set

Parameters
Name Type Description
$metadata string

Path to metadata file to consume

methodpublicinitElement( array $element,  $alwaysMerge ) : array

Initializes an element for processing

Parameters
Name Type Description
$element array

Element metadata

$alwaysMerge
Returns
Type Description
array
methodpublicisValidElement(  $element ) : void

Verifies that an element is valid and has all the required info.

Parameters
Name Type Description
$element
methodpublicverifyMetadata( array $metadata ) : bool

Verifies that required metadata is present for all dependencies. Called after all metadata defaults are merged and the final array is created.

Parameters
Name Type Description
$metadata array
Returns
Type Description
bool
Documentation was generated by DocBlox 0.18.1.