PHP Class OphTrOperationbooking_Operation_Session

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

Public Properties

Property Type Description
$DEFAULT_UNAVAILABLE_REASON
$TOO_MANY_PROCEDURES_REASON
$helper OphTrOperationbooking_BookingHelper

Public Methods

Method Description
attributeLabels ( ) : array
getActiveBookingsForWard ( $ward_id = null )
getAvailableMinutes ( )
getAvailableProcedureCount ( ) : integer Return the remaining number of procedures allowed in this session.
getBookedMinutes ( )
getBookedProcedureCount ( ) : integer Get the total number of procedures booked into this session across all bookings.
getDuration ( )
getFirmName ( )
getHelper ( ) : OphTrOperationbooking_BookingHelper Wrapper for getting the helper class.
getMinuteStatus ( )
getNextSessionForFirmId ( $firm_id ) : OphTrOperationbooking_Operation_Session | null Get the next session for the given firm id.
getStatus ( )
getTheatreName ( )
getTimeSlot ( )
getUnavailableReasonList ( ) : OphTrOperationbooking_Operation_Session_UnavailableReason[] Retrieves all valid OphTrOperationbooking_Operation_Session_UnavailableReason that can be used for this instance (i.e. includes the current value even if its no longer active).
getWarnings ( ) : array Returns an array of warning messages when any limits on the session are exceeded.
getWeekdayText ( ) : false | string Get the weekday name from the date
model ( string $className = __CLASS__ ) : the Returns the static model of the specified AR class.
operationBookable ( $operation ) : boolean Test whether the given operation can be booked into this session.
relations ( ) : array
rules ( ) : array
search ( ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
tableName ( ) : string
unbookableReason ( $operation ) : string Return the reason an operation cannot be booked into this session.
validateRequiredIfAttrMatches ( $attribute, $params ) The $attribute is required if the $params['match_attr'] is equal to the $params['match_val'].

Protected Methods

Method Description
beforeDelete ( ) Dissociate the session from cancelled bookings and ERODs before deletion.
beforeSave ( )
beforeValidate ( ) : boolean Checks made before the validation runs
validateNewSessionConflict ( ) Validates new sessions to find conflicts with existing sessions

Private Methods

Method Description
isAdmin ( ) : boolean

Method Details

attributeLabels() public method

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

beforeDelete() protected method

Dissociate the session from cancelled bookings and ERODs before deletion.
protected beforeDelete ( )

beforeSave() protected method

protected beforeSave ( )

beforeValidate() protected method

Checks made before the validation runs
protected beforeValidate ( ) : boolean
return boolean

getActiveBookingsForWard() public method

public getActiveBookingsForWard ( $ward_id = null )

getAvailableMinutes() public method

public getAvailableMinutes ( )

getAvailableProcedureCount() public method

Return the remaining number of procedures allowed in this session.

getBookedMinutes() public method

public getBookedMinutes ( )

getBookedProcedureCount() public method

Get the total number of procedures booked into this session across all bookings.

getDuration() public method

public getDuration ( )

getFirmName() public method

public getFirmName ( )

getHelper() public method

Wrapper for getting the helper class.
public getHelper ( ) : OphTrOperationbooking_BookingHelper
return OphTrOperationbooking_BookingHelper

getMinuteStatus() public method

public getMinuteStatus ( )

getNextSessionForFirmId() public static method

Get the next session for the given firm id.
public static getNextSessionForFirmId ( $firm_id ) : OphTrOperationbooking_Operation_Session | null
$firm_id
return OphTrOperationbooking_Operation_Session | null

getStatus() public method

public getStatus ( )

getTheatreName() public method

public getTheatreName ( )

getTimeSlot() public method

public getTimeSlot ( )

getUnavailableReasonList() public method

Retrieves all valid OphTrOperationbooking_Operation_Session_UnavailableReason that can be used for this instance (i.e. includes the current value even if its no longer active).
public getUnavailableReasonList ( ) : OphTrOperationbooking_Operation_Session_UnavailableReason[]
return OphTrOperationbooking_Operation_Session_UnavailableReason[]

getWarnings() public method

Returns an array of warning messages when any limits on the session are exceeded.
public getWarnings ( ) : array
return array

getWeekdayText() public method

Get the weekday name from the date
public getWeekdayText ( ) : false | string
return false | string

model() public static method

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

operationBookable() public method

Test whether the given operation can be booked into this session.
public operationBookable ( $operation ) : boolean
$operation
return boolean

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

unbookableReason() public method

Return the reason an operation cannot be booked into this session.
public unbookableReason ( $operation ) : string
$operation
return string

validateNewSessionConflict() protected method

Validates new sessions to find conflicts with existing sessions

validateRequiredIfAttrMatches() public method

The $attribute is required if the $params['match_attr'] is equal to the $params['match_val'].
public validateRequiredIfAttrMatches ( $attribute, $params )
$attribute - the element attribute that must be an earlier date
$params - 'later_date' is the attribute to compare it with

Property Details

$DEFAULT_UNAVAILABLE_REASON public static property

public static $DEFAULT_UNAVAILABLE_REASON

$TOO_MANY_PROCEDURES_REASON public static property

public static $TOO_MANY_PROCEDURES_REASON

$helper public property

public OphTrOperationbooking_BookingHelper $helper
return OphTrOperationbooking_BookingHelper