include/SugarFields/Fields/Teamset/SugarFieldTeamset.php

Show: inherited
Table of Contents

\SugarFieldTeamset

Package:

SugarFieldBase translates and displays fields from a vardef definition into different formats including DetailView, ListView, EditView. It also provides Search Inputs and database queries to handle searching

Parent(s)
\SugarFieldBase

Properties

Propertypublic  $add_user_private_team= 'true'
Default valuetrueDetails
Type
n/a
Propertypublic  $field_name= ''team_name''
Default value'team_name'Details
Type
n/a
Propertypublic  $fields= ''
Details
Type
n/a
Propertypublic  $hasButton= 'false'
inheritedInherited from: \SugarFieldBase::$$hasButton
Default valuefalseDetails
Type
n/a
Inherited_from
\SugarFieldBase::$$hasButton  
Propertypublic  $params= 'null'
Default valuenullDetails
Type
n/a
Propertypublic  $smarty= 'null'
Default valuenullDetails
Type
n/a
Propertypublic  $ss= ''
inheritedInherited from: \SugarFieldBase::$$ss
Details
Type
n/a
Inherited_from
\SugarFieldBase::$$ss  
Propertypublic  $view= 'null'
Default valuenullDetails
Type
n/a

Methods

methodpublicSugarFieldBase(  $type ) : void
inherited

Inherited from: \SugarFieldBase::SugarFieldBase()
Parameters
Name Type Description
$type
methodprivate_isTeamId(  $value,  $module ) : void

Parameters
Name Type Description
$value
$module
methodpublicdisplay( ) : void

methodpublicdisplayFromFunc(  $displayType,  $parentFieldArray,  $vardef,  $displayParams,  $tabindex = 0 ) : void
inherited

Inherited from: \SugarFieldBase::displayFromFunc()
Parameters
Name Type Description
$displayType
$parentFieldArray
$vardef
$displayParams
$tabindex
methodpublicfetch(  $path ) : void
inherited

Inherited from: \SugarFieldBase::fetch()
Parameters
Name Type Description
$path
methodpublicfindTemplate(  $view ) : void
inherited

Inherited from: \SugarFieldBase::findTemplate()
Parameters
Name Type Description
$view
methodpublicformatField(  $rawField,  $vardef ) : void
inherited

Inherited from: \SugarFieldBase::formatField()
Parameters
Name Type Description
$rawField
$vardef
methodprotectedgetAccessKey(  $vardef,  $fieldType = null,  $module = null ) : void
inherited

Inherited from: \SugarFieldBase::getAccessKey()
Parameters
Name Type Description
$vardef
$fieldType
$module
methodpublicgetChangeLogSmarty(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex ) : void
inherited

Inherited from: \SugarFieldBase::getChangeLogSmarty()
Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
methodpublicgetClassicView( \$field $fields = array(), \$formName $formName = 'EditView' ) : void

getClassicView

Parameters
Name Type Description
$fields \$field

Array of the SugarBean's field definitions

$formName \$formName

String value of the form name to insert team set field to, default is EditView

methodpublicgetClassicViewQS( ) : void

methodpublicgetDetailViewSmarty( \parentFieldArray $parentFieldArray, \vardef $vardef, \displayParam $displayParams,  $tabindex,  $searchView = false ) : void

getDetailViewSmarty Override for the SugarFieldCollection class to set the vardef name from team_name to team_set_id

Parameters
Name Type Description
$parentFieldArray \parentFieldArray

string name of the variable in the parent template for the bean's data

$vardef \vardef

vardef field defintion

$displayParams \displayParam

parameters for display available paramters are: * labelSpan - column span for the label * fieldSpan - column span for the field

$tabindex
$searchView
methodpublicgetEditView( ) : void
inherited

Inherited from: \SugarFieldBase::getEditView()
methodpublicgetEditViewSmarty( \$parentFieldArray $parentFieldArray, \$vardef $vardef, \$diaplayParams $displayParams, \$tabindex $tabindex, \$searchView $searchView = false ) : void

getEditViewSmarty Returns the Smarty code portion to render the edit view of the field

Parameters
Name Type Description
$parentFieldArray \$parentFieldArray

String value of the Smarty variable name that contains the fields Array

$vardef \$vardef

Array of the field definition entry

$displayParams \$diaplayParams

Array of optional display parameters passed in from metadata

$tabindex \$tabindex

Integer value of the tabindex that should be assigned to the HTML output for this field

$searchView \$searchView

boolean value indicating whether or not to use the search form rendering

methodpublicgetEmailTemplateValue(  $inputField,  $vardef,  $context = null ) : void
inherited

Inherited from: \SugarFieldBase::getEmailTemplateValue()
Parameters
Name Type Description
$inputField
$vardef
$context
methodpublicgetImportViewSmarty(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex ) : void

Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
methodpublicgetListViewSmarty(  $parentFieldArray,  $vardef,  $displayParams,  $col ) : void

Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$col
methodpublicgetMassUpdateViewSmarty(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex,  $searchView = false ) : void

getMassUpdateViewSmarty

Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
$searchView
methodpublicgetPopupViewSmarty(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex ) : void

Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
methodpublicgetPrimaryTeamIdFromRequest( string $field, array $vars ) : string

Given the REQUEST, return the selected primary team id, if none found, then return ''

Parameters
Name Type Description
$field string

the name of the field on the UI

$vars array

array of REQUEST params to look at

Returns
Type Description
string the primary team id or empty
methodpublicgetQueryIn( ) : void
inherited

Inherited from: \SugarFieldBase::getQueryIn()
methodpublicgetQueryLike( ) : void
inherited

Inherited from: \SugarFieldBase::getQueryLike()
methodpublicgetSearchInput( \$key $key = '', \$args $args = array() ) : \$value
inherited

getSearchInput

Inherited from: \SugarFieldBase::getSearchInput()

This function allows the SugarFields to handle returning the search input value given arguments (typically from $_REQUEST/$_POST) and a search string.

Parameters
Name Type Description
$key \$key

String value of key to search for

$args \$args

Mixed value containing haystack to search for value in

Returns
Type Description
\$value Mixed value that the SugarField should return
methodpublicgetSearchViewSmarty(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex ) : void

Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
methodpublicgetSearchWhereValue( \$value $value ) : Mixed
inherited

getSearchWhereValue

Inherited from: \SugarFieldBase::getSearchWhereValue()

Checks and returns a sane value based on the field type that can be used when building the where clause in a search form.

Parameters
Name Type Description
$value \$value

Mixed value being searched on

Returns
Type Description
Mixed the value for the where clause used in search
methodpublicgetSmartyView(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex = -1,  $view ) : void
inherited

Inherited from: \SugarFieldBase::getSmartyView()
Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
$view
methodpublicgetTeamIdSearchField(  $field ) : void

getTeamIdSearchField

Parameters
Name Type Description
$field
methodpublicgetTeamSetIdSearchField(  $field,  $type = 'any',  $teams = array(),  $params = array() ) : \unknown_type

getTeamSetIdSearchField

Parameters
Name Type Description
$field
$type
$teams
$params
Returns
Type Description
\unknown_type
methodpublicgetTeamsFromRequest( string $field,  $vars = array() ) : array

Obtain the set of teams selected from the REQUEST

Parameters
Name Type Description
$field string

the name of the field on the UI

$vars
Returns
Type Description
array array of team ids
methodpublicgetWirelessDetailViewSmarty(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex ) : void
Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
methodpublicgetWirelessEditViewSmarty(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex ) : void
Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
methodpublicgetWirelessListViewSmarty(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex ) : void
Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
methodpublicgetWirelessSmartyView(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex = -1,  $view ) : void
inherited

Inherited from: \SugarFieldBase::getWirelessSmartyView()
Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
$view
methodpublicimportSanitize( \$value $value, \$vardefs $vardef, \$focus $focus, \$settings $settings ) : string

Handles import field sanitizing for an field type

Parameters
Name Type Description
$value \$value

string value to be sanitized

$vardef \$vardefs

array

$focus \$focus

SugarBean object

$settings \$settings

ImportFieldSanitize object

Returns
Type Description
string sanitized value or boolean false if there's a problem with the value
Details
See
\SugarFieldBase::importSanitize()  
methodpublicinitClassicView(  $fields,  $formName = 'EditView' ) : void

Parameters
Name Type Description
$fields
$formName
methodpublicinitialize( ) : void

methodprotectedisRangeSearchView( array $vardef ) : boolean
inherited

isRangeSearchView This method helps determine whether or not to display the range search view code for the sugar field

Inherited from: \SugarFieldBase::isRangeSearchView()
Parameters
Name Type Description
$vardef array

entry representing the sugar field's definition

Returns
Type Description
boolean true if range search view should be displayed, false otherwise
methodprotectedisTrimmable( string $type ) : boolean
inherited

Check if the field is allowed to be trimmed

Inherited from: \SugarFieldBase::isTrimmable()
Parameters
Name Type Description
$type string
Returns
Type Description
boolean
methodpublicprocess( ) : void

process

This method is used to call the view object's process method and init_tpl methods We separated it from the display method so that the renderEditView, renderDetailView and renderSearchView method may provide some additional functionality before the process method is made to the view object.

methodpublicrender(  $params,  $smarty ) : void

Parameters
Name Type Description
$params
$smarty
methodpublicrenderDetailView( ) : void

renderDetailView This method is called to display the detail view of the teams widget

methodpublicrenderEditView( ) : void

renderEditView This method is called to display the edit view of the teams widget

methodpublicrenderImportView( ) : void

renderImportView

methodpublicrenderSearchView( ) : void

renderSearchView

methodpublicsave( \SugarBean $bean, \unknown_type $params, string $field, \unknown_type $properties,  $prefix = '' ) : void

Given the bean and the REQUEST attempt to save the selected team ids to the bean

Parameters
Name Type Description
$bean \SugarBean
$params \unknown_type
$field string
$properties \unknown_type
$prefix
methodpublicsetup(  $parentFieldArray,  $vardef,  $displayParams,  $tabindex,  $twopass = true ) : void
inherited

Setup function to assign values to the smarty template, should be called before every display function

Inherited from: \SugarFieldBase::setup()
Parameters
Name Type Description
$parentFieldArray
$vardef
$displayParams
$tabindex
$twopass
methodprotectedsetupFieldArray( mixed $parentFieldArray, array $vardef ) : array
inherited

setupFieldArray This method takes the $parentFieldArray mixed variable which may be an Array or object and attempts to call any custom fieldSpecific formatting to the value depending on the field type.

Inherited from: \SugarFieldBase::setupFieldArray()
Parameters
Name Type Description
$parentFieldArray mixed

Array or Object of data where the field's value comes from

$vardef array

The vardef entry linked to the SugarField instance

Returns
Type Description
array $parentFieldArray The formatted $parentFieldArray with the formatField method possibly applied
Details
See
\SugarFieldEnum.php,  
methodpublicunformatField(  $formattedField,  $vardef ) : void
inherited

Inherited from: \SugarFieldBase::unformatField()
Parameters
Name Type Description
$formattedField
$vardef
Documentation was generated by DocBlox 0.18.1.