modules/ModuleBuilder/parsers/StandardField.php

Show: inherited
Table of Contents

\StandardField

Package:
Parent(s)
\DynamicField

Properties

Propertypublic  $baseField= ''
Details
Type
n/a
Propertypublic  $base_def= 'array()'
Default valuearray()Details
Type
n/a
Propertypublic  $base_path= '""'
inheritedInherited from: \DynamicField::$$base_path
Default value""Details
Type
n/a
Inherited_from
\DynamicField::$$base_path  
Propertypublic  $custom_def= 'array()'
Default valuearray()Details
Type
n/a
Propertypublic  $use_existing_labels= 'false'
inheritedInherited from: \DynamicField::$$use_existing_labels
Default valuefalseDetails
Type
n/a
Inherited_from
\DynamicField::$$use_existing_labels  

Methods

methodpublicDynamicField(  $module = '' ) : void
inherited

Inherited from: \DynamicField::DynamicField()
Parameters
Name Type Description
$module
methodpublic__construct(  $module = '' ) : void

Parameters
Name Type Description
$module
methodpublicaddField( \unknown_type $name, \unknown_type $label = '', \unknown_type $type = 'Text', \unknown_type $max_size = '255', \unknown_type $required_option = 'optional', \unknown_type $default_value = '', \unknown_type $ext1 = '', \unknown_type $ext2 = '', \unknown_type $ext3 = '', \unknown_type $audited = 0, \unknown_type $mass_update = 0, \unknown_type $ext4 = '', \unknown_type $help = '', \unknown_type $duplicate_merge = 0, \unknown_type $comment = '' ) : boolean
inherited

DEPRECIATED: Use addFieldObject instead.

Inherited from: \DynamicField::addField()

Adds a Custom Field using parameters

Parameters
Name Type Description
$name \unknown_type
$label \unknown_type
$type \unknown_type
$max_size \unknown_type
$required_option \unknown_type
$default_value \unknown_type
$ext1 \unknown_type
$ext2 \unknown_type
$ext3 \unknown_type
$audited \unknown_type
$mass_update \unknown_type
$ext4 \unknown_type
$help \unknown_type
$duplicate_merge \unknown_type
$comment \unknown_type
Returns
Type Description
boolean
methodpublicaddFieldObject( \Field $field ) : boolean

Adds a custom field using a field object

Parameters
Name Type Description
$field \Field

Object $field

Returns
Type Description
boolean
methodpublicaddLabel( string $displayLabel ) : string
inherited

Adds a label to the module's mod_strings for the current language Note that the system label name

Inherited from: \DynamicField::addLabel()
Parameters
Name Type Description
$displayLabel string

The label value to be displayed

Returns
Type Description
string The core of the system label name - returns currency_id5 for example, when the full label would then be LBL_CURRENCY_ID5 TODO: Only the core is returned for historical reasons - switch to return the real system label
methodpublicadd_existing_custom_field(  $data,  $execute = true ) : void
inherited

Inherited from: \DynamicField::add_existing_custom_field()
Parameters
Name Type Description
$data
$execute
methodpublicadd_existing_custom_fields(  $execute = true ) : void
inherited

Updates the db schema and adds any custom fields we have used if the custom table was dropped

Inherited from: \DynamicField::add_existing_custom_fields()
Parameters
Name Type Description
$execute
methodpublicbuildCache( STRING $module = false, boolean $saveCache = true ) : \unknown
inherited

Builds the cache for custom fields based on the vardefs

Inherited from: \DynamicField::buildCache()
Parameters
Name Type Description
$module STRING
$saveCache boolean

saveCache Boolean value indicating whether or not to pass saveCache value to saveToVardef, defaults to true

Returns
Type Description
\unknown
methodpubliccreateCustomTable(  $execute = true ) : void
inherited

Creates the custom table with an id of id_c

Inherited from: \DynamicField::createCustomTable()
Parameters
Name Type Description
$execute
methodpublicdeleteCache( ) : void
inherited

Inherited from: \DynamicField::deleteCache()
methodpublicdeleteField(  $widget ) : void
inherited

Deletes the field from fields_meta_data and drops the database column then it rebuilds the cache Use the widgets get_db_modify_alter_table() method to get the table sql - some widgets do not need any custom table modifications

Inherited from: \DynamicField::deleteField()
Parameters
Name Type Description
$widget
methodpublicfieldExists(  $name = '',  $type = '' ) : void
inherited

Inherited from: \DynamicField::fieldExists()
Parameters
Name Type Description
$name
$type
methodpublicfill_relationships( ) : void
inherited

Fills in all the custom fields of type relate relationships for an object

Inherited from: \DynamicField::fill_relationships()
methodpublicgetAllFieldsView(  $view,  $type ) : void
inherited

Inherited from: \DynamicField::getAllFieldsView()
Parameters
Name Type Description
$view
$type
methodpublicgetDBName( STRING $name, BOOLEAN $_C = true ) : STRING
inherited

Returns a Database Safe Name

Inherited from: \DynamicField::getDBName()
Parameters
Name Type Description
$name STRING
$_C BOOLEAN

do we append _c to the name

Returns
Type Description
STRING
methodpublicgetFieldWidget(  $module,  $fieldName ) : void
inherited

Returns the widget for a custom field from the fields_meta_data table.

Inherited from: \DynamicField::getFieldWidget()
Parameters
Name Type Description
$module
$fieldName
methodpublicgetJOIN( \$expandedList $expandedList = false,  $includeRelates = false,  $where = false ) : array
inherited

returns either false or an array containing the select and join parameter for a query using custom fields

Inherited from: \DynamicField::getJOIN()
Parameters
Name Type Description
$expandedList \$expandedList

boolean If true, return a list of all fields with source=custom_fields in the select instead of the standard _cstm.* This is required for any downstream construction of a SQL statement where we need to manipulate the select list, for example, listviews with custom relate fields where the value comes from join rather than from the custom table

$includeRelates
$where
Returns
Type Description
array select=>select columns, join=>prebuilt join statement
methodpublicgetModuleName( ) : void
inherited

Inherited from: \DynamicField::getModuleName()
methodpublicgetPackageName( ) : void
inherited

Inherited from: \DynamicField::getPackageName()
methodpublicgetRelateJoin(  $field_def,  $joinTableAlias ) : void
inherited

Inherited from: \DynamicField::getRelateJoin()
Parameters
Name Type Description
$field_def
$joinTableAlias
methodprotectedisDefaultValue(  $property,  $value,  $baseField ) : void
inherited

Inherited from: \DynamicField::isDefaultValue()
Parameters
Name Type Description
$property
$value
$baseField
methodprotectedloadBaseDef(  $field ) : void

Parameters
Name Type Description
$field
methodprotectedloadCustomDef(  $field ) : void

Parameters
Name Type Description
$field
methodpublicpopulateAllXTPL(  $xtpl,  $view ) : void
inherited

Inherited from: \DynamicField::populateAllXTPL()
Parameters
Name Type Description
$xtpl
$view
methodpublicpopulateXTPL(  $xtpl,  $view ) : void
inherited

Inherited from: \DynamicField::populateXTPL()
Parameters
Name Type Description
$xtpl
$view
methodprotectedremoveVardefExtension(  $field ) : void
inherited

Inherited from: \DynamicField::removeVardefExtension()
Parameters
Name Type Description
$field
methodpublicrepairCustomFields(  $execute = true ) : void
inherited

Inherited from: \DynamicField::repairCustomFields()
Parameters
Name Type Description
$execute
methodpublicretrieve( ) : void
inherited

DEPRECATED loads fields into the bean This used to be called during the retrieve process now it is done through a join Restored from pre-r30895 to maintain support for custom code that may have called retrieve() directly

Inherited from: \DynamicField::retrieve()
methodpublicsave( boolean $isUpdate ) : void
inherited

Process the save action for sugar bean custom fields

Inherited from: \DynamicField::save()
Parameters
Name Type Description
$isUpdate boolean
methodpublicsaveExtendedAttributes(  $field,  $column_fields ) : void
inherited

Inherited from: \DynamicField::saveExtendedAttributes()
Parameters
Name Type Description
$field
$column_fields
methodpublicsaveToVardef( string $module, array $result, boolean $saveCache = true ) : void
inherited

Updates the cached vardefs with the custom field information stored in result

Inherited from: \DynamicField::saveToVardef()
Parameters
Name Type Description
$module string
$result array
$saveCache boolean

saveCache Boolean value indicating whether or not to call VardefManager::saveCache, defaults to true

methodpublicsetLabel(  $language = 'en_us',  $key,  $value ) : void
inherited

Inherited from: \DynamicField::setLabel()
Parameters
Name Type Description
$language
$key
$value
methodpublicsetWhereClauses(  $where_clauses ) : void
inherited

Inherited from: \DynamicField::setWhereClauses()
Parameters
Name Type Description
$where_clauses
methodpublicsetup( \SUGARBEAN $bean = null ) : void
inherited

This will add the bean as a reference in this object as well as building the custom field cache if it has not been built LOADS THE BEAN IF THE BEAN IS NOT BEING PASSED ALONG IN SETUP IT SHOULD BE SET PRIOR TO SETUP

Inherited from: \DynamicField::setup()
Parameters
Name Type Description
$bean \SUGARBEAN
methodprotectedwriteVardefExtension(  $bean_name,  $field,  $def_override ) : void
inherited

Inherited from: \DynamicField::writeVardefExtension()
Parameters
Name Type Description
$bean_name
$field
$def_override
Documentation was generated by DocBlox 0.18.1.