PHP Class Element_OphTrOperationbooking_ScheduleOperation

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

Public Properties

Property Type Description
$service

Protected Properties

Property Type Description
$_unavailable_dates

Public Methods

Method Description
__set ( string $name, mixed $value ) : mixed | void make sure the cached dates array is reset when patient_unavailables is updated.
afterValidate ( ) Make sure patient_unavailables are validated.
attributeLabels ( ) : array
getContainer_view_view ( )
getCurrentBooking ( ) : OphTrOperationbooking_Operation_Booking Get the operation booking for the event.
isPatientAvailable ( $date ) : boolean Given a date (yyyy-mm-dd) check if the patient is available, and return true or false as appropriate.
model ( $className = __CLASS__ ) : the Returns the static model of the specified AR class.
relations ( ) : array
rules ( ) : array
search ( ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
tableName ( ) : string
updatePatientUnavailables ( $unavailables ) Set the patient unavailable objects for this element.
validateNoBookingCollision ( $attribute, $params ) Ensure that if there is a current booking on this event, the patient unavailables dates don't collide with the booking.
validateNoDateRangeOverlap ( $attribute, $params ) validate a date is earlier or equal to another.

Method Details

__set() public method

make sure the cached dates array is reset when patient_unavailables is updated.
public __set ( string $name, mixed $value ) : mixed | void
$name string
$value mixed
return mixed | void

afterValidate() public method

Make sure patient_unavailables are validated.
public afterValidate ( )

attributeLabels() public method

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

getContainer_view_view() public method

getCurrentBooking() public method

Get the operation booking for the event.
public getCurrentBooking ( ) : OphTrOperationbooking_Operation_Booking
return OphTrOperationbooking_Operation_Booking

isPatientAvailable() public method

Given a date (yyyy-mm-dd) check if the patient is available, and return true or false as appropriate.
public isPatientAvailable ( $date ) : boolean
$date
return boolean

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.

rules() public method

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

tableName() public method

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

updatePatientUnavailables() public method

Set the patient unavailable objects for this element.
public updatePatientUnavailables ( $unavailables )
$unavailables

validateNoBookingCollision() public method

Ensure that if there is a current booking on this event, the patient unavailables dates don't collide with the booking.
public validateNoBookingCollision ( $attribute, $params )
$attribute
$params

validateNoDateRangeOverlap() public method

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

Property Details

$_unavailable_dates protected property

protected $_unavailable_dates

$service public property

public $service