package Gems
subpackage Tracker
copyright Copyright (c) 2012 Erasmus MC
license New BSD License
since Class available since version 1.6.2

 Methods

Copy from \Zend_Translate_Adapter

_(string $text, string|\Zend_Locale $locale = null) : string

Translates the given string returns the translation

Parameters

$text

string

Translation string

$locale

string\Zend_Locale

(optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information

Returns

string

__construct()

__construct(string $modelName = 'fields_maintenance', string $modelField = 'sub'

Parameters

$modelName

string

Hopefully unique model name

$modelField

string

The name of the field used to store the sub model

Process on load functions and dependencies

_processRowAfterLoad(array $row, boolean $new = false, boolean $isPost = false, array $transformColumns = array()) : array
see
see

Parameters

$row

array

The row values to load

$new

boolean

True when it is a new item not saved in the model

$isPost

boolean

True when passing on post data

$transformColumns

array

Returns

arrayThe possibly adapted array of values

Called after the check that all required registry values have been set correctly has run.

afterRegistry() : void

This function is no needed if the classes are setup correctly

Set those settings needed for the browse display

applyBrowseSettings(boolean $detailed = false) : \Gems\Tracker\Model\FieldMaintenanceModel

Parameters

$detailed

boolean

For detailed settings

Returns

\Gems\Tracker\Model\FieldMaintenanceModel(continuation pattern)

Set those settings needed for the detailed display

applyDetailSettings() : \Gems\Tracker\Model\FieldMaintenanceModel

Returns

\Gems\Tracker\Model\FieldMaintenanceModel(continuation pattern)

Set those values needed for editing

applyEditSettings() : \Gems\Tracker\Model\FieldMaintenanceModel

Returns

\Gems\Tracker\Model\FieldMaintenanceModel(continuation pattern)

Delete items from the model

delete(mixed $filter = true) : integer

Parameters

$filter

mixed

True to use the stored filter, array to specify a different filter

Returns

integerThe number of items deleted

The list of field types

getFieldTypes() : array

Returns

arrayof storage name => label

Get the name of the union model that should be used for this row.

getModelNameForRow(array $row) : string

Parameters

$row

array

Returns

string

Get the dependency class name (if any)

getTypeDependencyClass(string $fieldType) : string

Parameters

$fieldType

string

Returns

stringClassname including Model\Dependency\ part

Does the model have a dependencies?

hasDependencies() : boolean

Returns

boolean

Returns an array containing the first requested item.

loadFirst(mixed $filter = true, mixed $sort = true, boolean $loadDependencies = true) : array

Parameters

$filter

mixed

True to use the stored filter, array to specify a different filteloa

$sort

mixed

True to use the stored sort, array to specify a different sort

$loadDependencies

boolean

When true the row dependencies are loaded

Returns

arrayAn array or false

Copy from \Zend_Translate_Adapter

plural(string $singular, string $plural, integer $number, string|\Zend_Locale $locale = null) : string

Translates the given string using plural notations Returns the translated string

see

Parameters

$singular

string

Singular translation string

$plural

string

Plural translation string

$number

integer

Number for detecting the correct plural

$locale

string\Zend_Locale

(Optional) Locale/Language to use, identical with locale identifier, @see \Zend_Locale for more information

Returns

string

Get the type from the row in case it was not set

getFieldType(array $row) : string

Parameters

$row

array

Loaded row

Returns

stringData type for the row

Function that checks the setup of this class/traight

initTranslateable() 

This function is not needed if the variables have been defined correctly in the source for this object and theose variables have been applied.

return @void

A ModelAbstract->setOnLoad() function that concatenates the value if it is an array.

loadCalculationSources(mixed $value, boolean $isNew = false, string $name = null, array $context = array(), boolean $isPost = false) : string
see

Parameters

$value

mixed

The value being saved

$isNew

boolean

True when a new item is being saved

$name

string

The name of the current field

$context

array

Optional, the other values being saved

$isPost

boolean

True when passing on post data

Returns

stringDesciption

 Properties

 

Should a type dependency be added uin _processRowAfterLoad?

$_addLoadDependency : boolean

Default

false
 

$db

$db : \Zend_Db_Adapter_Abstract

Default

 

The field types that have a dependency

$dependencies : array

Default

array('activity' => 'FromAppointmentsMaintenanceDependency', 'appointment' => 'AppointmentMaintenanceDependency', 'caretaker' => 'FromAppointmentsMaintenanceDependency', 'date' => 'FromAppointmentsMaintenanceDependency', 'datetime' => 'FromAppointmentsMaintenanceDependency', 'location' => 'FromAppointmentsMaintenanceDependency', 'multiselect' => 'ValuesMaintenanceDependency', 'select' => 'ValuesMaintenanceDependency', 'procedure' => 'FromAppointmentsMaintenanceDependency')
 

$loader

$loader : \Gems_Loader

Default

 

$tracker

$tracker : \Gems_Tracker

Default

 

$translate

$translate : \Zend_Translate

Default

 

$translateAdapter

$translateAdapter : \Zend_Translate_Adapter

Default

 

$util

$util : \Gems_Util

Default

 Constants

 

Constant name to id appointment items

APPOINTMENTS_NAME = 'a' 
 

Constant name to id field items

FIELDS_NAME = 'f' 
 

Option seperator for fields

FIELD_SEP = '|'