Свойство | Type | Description | |
---|---|---|---|
$auto_update_relations | (whilst developing this feature, will allow other elements to continue to work) | ||
$originalAttributes | |||
$relation_defaults | to be set when setting the left or right attribute of owning record. |
Méthode | Description | |
---|---|---|
NHSDate ( string $attribute, string $empty_string = '-' ) : string | Returns a date field in NHS format. | |
NHSDateAsHTML ( $attribute, string $empty_string = '-' ) : string | ||
__set ( string $name, mixed $value ) : mixed | void | If an array of arrays is passed for a HAS_MANY relation attribute, will create appropriate objects to assign to the attribute. Sets up the afterSave method to saves these objects if they have validated. | |
audit ( $target, $action, null $data = null, null $log_message = null, array $properties = [] ) | ||
canAutocomplete ( ) | ||
cloneObject ( $object, array $params = [] ) : mixed | ||
getAutocompleteField ( ) | ||
getCleanAttribute ( $attrName ) : string | Gets the clean version of an attribute, returns empty string if there was no clean version. | |
getRelationsDefaults ( $name ) : array | Convenience method wrapper on the relation defaults property. | |
getShortModelName ( ) : string | Shortened name of this model class, useful for namespaced modules. | |
isAttributeDirty ( $attrName ) : boolean | Checks if an attribute is dirty. | |
isModelDirty ( ) : boolean | Check if the model dirty. | |
model ( string $class_name = null ) | Override to use LSB. | |
save ( boolean $runValidation = true, array $attributes = null, boolean $allow_overriding = false ) : boolean | ||
saveOnlyIfDirty ( boolean $enable = true ) : BaseActiveRecord | Set the flag to indicate that model should only save to the db if the model is dirty. | |
tableName ( ) : string | Default to the lower case of the class to match naming convention for model tables. | |
textWithLineBreaks ( $field ) : mixed |
Méthode | Description | |
---|---|---|
afterFind ( ) | Stores the data in an array afterFind so when saving we can check if the value is dirty or not. | |
afterSave ( ) | Saves related objects now that we have a pk for the instance. | |
beforeDelete ( ) : boolean | Iterate through relations and remove the records that will break constraints. | |
beforeSave ( ) : boolean | Strips all html tags out of attributes to be saved. | |
setDefaultAdmissionTime ( $admissionTime, $startTime ) : boolean | string | Sets the default admission time. |
Méthode | Description | |
---|---|---|
afterSaveHasMany ( $name, $rel, $new_objs, $orig_objs ) | Save objects to the given relation. | |
afterSaveManyMany ( $name, CManyManyRelation $rel, $new_objs, $orig_objs ) | ||
afterSaveThruHasMany ( $name, $rel, $thru, $new_objs ) | Save the given objects for the through relation. |
public NHSDateAsHTML ( $attribute, string $empty_string = '-' ) : string | ||
$attribute | ||
$empty_string | string | |
Résultat | string |
protected afterFind ( ) |
protected afterSave ( ) |
protected beforeDelete ( ) : boolean | ||
Résultat | boolean |
protected beforeSave ( ) : boolean | ||
Résultat | boolean |
public static cloneObject ( $object, array $params = [] ) : mixed | ||
$object | ||
$params | array | |
Résultat | mixed |
public getCleanAttribute ( $attrName ) : string | ||
$attrName | ||
Résultat | string |
public getRelationsDefaults ( $name ) : array | ||
$name | ||
Résultat | array |
public static getShortModelName ( ) : string | ||
Résultat | string |
public isAttributeDirty ( $attrName ) : boolean | ||
$attrName | ||
Résultat | boolean |
public isModelDirty ( ) : boolean | ||
Résultat | boolean | true if the model dirty |
public save ( boolean $runValidation = true, array $attributes = null, boolean $allow_overriding = false ) : boolean | ||
$runValidation | boolean | |
$attributes | array | |
$allow_overriding | boolean | - if true allows created/modified user/date to be set and saved via the model (otherwise gets overriden) |
Résultat | boolean |
public saveOnlyIfDirty ( boolean $enable = true ) : BaseActiveRecord | ||
$enable | boolean | |
Résultat | BaseActiveRecord |
protected setDefaultAdmissionTime ( $admissionTime, $startTime ) : boolean | string | ||
$admissionTime | ||
$startTime | ||
Résultat | boolean | string |
public textWithLineBreaks ( $field ) : mixed | ||
$field | ||
Résultat | mixed |
protected $auto_update_relations |