Class that checks whether changing the field type is allowed.

subpackage Tracker_Model
subpackage FieldTypeChangeDependency
copyright Copyright (c) 2015 Erasmus MC
license New BSD License
since Class available since version 1.6.5 18-mrt-2015 13:07:12
package Gems

 Methods

__construct()

__construct(string $dependsOn) 

Parameters

$dependsOn

string

the model field to depend on

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

afterRegistry() : void

Returns the changes that must be made in an array consisting of

getChanges(array $context, boolean $new) : array

array( field1 => array(setting1 => $value1, setting2 => $value2, ...), field2 => array(setting3 => $value3, setting4 => $value4, ...),

By using [] array notation in the setting name you can append to existing values.

Use the setting 'value' to change a value in the original data.

When a 'model' setting is set, the workings cascade.

Parameters

$context

array

The current data this object is dependent on

$new

boolean

True when the item is a new record not yet saved

Returns

arrayname => array(setting => value)

Adapt/extend this function if you need different queries for other types

getSql(string $subId) : string | boolean

Parameters

$subId

string

The current sub type of field

Returns

stringbooleanAn sql statement or false

 Properties

 

Array of name => array(setting => setting) of fields with settings changed by this dependency

$_effecteds : array

Default

array('gtf_field_type' => array('elementClass', 'onchange'))

Can be overriden in sub class

 

$db

$db : \Zend_Db_Adapter_Abstract

Default

 

Required

$request : \Zend_Controller_Request_Abstract

Default