PHP Class OphCoTherapyapplication_ExceptionalCircumstances_PastIntervention

The followings are the available columns in table:
Inheritance: extends BaseActiveRecordVersioned
Show file Open project: openeyes/openeyes Class Usage Examples

Protected Properties

Property Type Description
$_va_list internal store of valid va values that can be selected for start and end VA

Public Methods

Method Description
attributeLabels ( ) : array
getStopReasonText ( ) : string get the text for the stopping reason for this treatment.
getTreatmentName ( ) : string get the treatment name for this past intervention.
getTreatmentOptions ( $selected_id ) : array get the treatment options for this intervention.
getVaOptions ( ) : array gets the valid VA values for use in a form.
model ( $className = __CLASS__ ) : the Returns the static model of the specified AR class.
relations ( ) : array
requiredDependingOnTreatmentType ( string $attribute, array $params ) validate the right type of treatment is set on the model depending on the treatment type.
requiredIfRelevantTreatmentIsOther ( string $attribute, array $params ) validate that a treatment is given if the treatment is 'other'.
requiredIfStopReasonIsOther ( string $attribute, array $params ) validate that a reason is given if the stop reason select is of type other.
rules ( ) : array
search ( ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
setDefaultOptions ( ) Set default values for forms on create.
tableName ( ) : string
validateEarlierOrEqualDate ( $attribute, $params ) validate a date is earlier or equal to another.

Protected Methods

Method Description
afterSave ( )
beforeSave ( )
beforeValidate ( )

Method Details

afterSave() protected method

protected afterSave ( )

attributeLabels() public method

public attributeLabels ( ) : array
return array customized attribute labels (name=>label)

beforeSave() protected method

protected beforeSave ( )

beforeValidate() protected method

protected beforeValidate ( )

getStopReasonText() public method

get the text for the stopping reason for this treatment.
public getStopReasonText ( ) : string
return string

getTreatmentName() public method

get the treatment name for this past intervention.
public getTreatmentName ( ) : string
return string

getTreatmentOptions() public method

get the treatment options for this intervention.
public getTreatmentOptions ( $selected_id ) : array
return array $options key,value pair list

getVaOptions() public method

gets the valid VA values for use in a form.
public getVaOptions ( ) : array
return array key, value pair list

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
return the static model class

relations() public method

public relations ( ) : array
return array relational rules.

requiredDependingOnTreatmentType() public method

validate the right type of treatment is set on the model depending on the treatment type.
public requiredDependingOnTreatmentType ( string $attribute, array $params )
$attribute string
$params array - must include boolean flag for key of relevant

requiredIfRelevantTreatmentIsOther() public method

validate that a treatment is given if the treatment is 'other'.
public requiredIfRelevantTreatmentIsOther ( string $attribute, array $params )
$attribute string
$params array

requiredIfStopReasonIsOther() public method

validate that a reason is given if the stop reason select is of type other.
public requiredIfStopReasonIsOther ( string $attribute, array $params )
$attribute string
$params array

rules() public method

public rules ( ) : array
return array validation rules for model attributes.

setDefaultOptions() public method

Set default values for forms on create.
public setDefaultOptions ( )

tableName() public method

public tableName ( ) : string
return string the associated database table name

validateEarlierOrEqualDate() public method

validate a date is earlier or equal to another.
public validateEarlierOrEqualDate ( $attribute, $params )
$attribute - the element attribute that must be an earlier date
$params - 'later_date' is the attribute to compare it with

Property Details

$_va_list protected property

internal store of valid va values that can be selected for start and end VA
protected $_va_list