ExpressionEngine Docs

# SpecialtyTemplate Model Extension Hooks

- `before_specialty_template_insert($channel, $values)`
- `after_specialty_template_insert($channel, $values)`
- `before_specialty_template_update($channel, $values, $modified)`
- `after_specialty_template_update($channel, $values, $modified)`
- `before_specialty_template_save($channel, $values)`
- `after_specialty_template_save($channel, $values)`
- `before_specialty_template_delete($channel, $values)`
- `after_specialty_template_delete($channel, $values)`

### `before_specialty_template_insert($channel, $values)`

Parameter | Type | Description
--- | --- | ---
$channel | `Object` | Current SpecialtyTemplate model object
$values | `Array` | The SpecialtyTemplate model object data as an array
Returns | `NULL` | void

Called before the specialty templateobject is inserted. Changes made to the object will be saved automatically.

How it’s called:

    ee()->extensions->call('before_specialty_template_insert', $this, $this->getValues());

### `after_specialty_template_insert($channel, $values)`

Parameter | Type | Description
--- | --- | ---
$channel | `Object` | Current SpecialtyTemplate model object
$values | `Array` | The SpecialtyTemplate model object data as an array
Returns | `NULL` | void

Called after the specialty templateobject is inserted. Changes made to the object object will not be saved automatically. Saving the object may trigger the save and update hooks.

How it’s called:

    ee()->extensions->call('after_specialty_template_insert', $this, $this->getValues());

### `before_specialty_template_update($channel, $values, $modified)`

Parameter | Type | Description
--- | --- | ---
$channel | `Object` | Current SpecialtyTemplate model object
$values | `Array` | The SpecialtyTemplate model object data as an array
$modified | `Array` | An array of all the old values that were changed
Returns | `NULL` | void

Called before the specialty templateobject is updated. Changes made to the object will be saved automatically.

How it’s called:

    ee()->extensions->call('before_specialty_template_update', $this, $this->getValues(), $modified);

### `after_specialty_template_update($channel, $values, $modified)`

Parameter | Type | Description
--- | --- | ---
$channel | `Object` | Current SpecialtyTemplate model object
$values | `Array` | The SpecialtyTemplate model object data as an array
$modified | `Array` | An array of all the old values that were changed
Returns | `NULL` | void

Called after the specialty templateobject is updated. Changes made to the object will not be saved automatically. Calling save may fire additional hooks.

How it’s called:

    ee()->extensions->call('after_specialty_template_update', $this, $this->getValues(), $modified);

### `before_specialty_template_save($channel, $values)`

Parameter | Type | Description
--- | --- | ---
$channel | `Object` | Current SpecialtyTemplate model object
$values | `Array` | The SpecialtyTemplate model object data as an array
Returns | `NULL` | void

Called before the specialty templateobject is inserted or updated. Changes made to the object will be saved automatically.

How it’s called:

    ee()->extensions->call('before_specialty_template_save', $this, $this->getValues());

### `after_specialty_template_save($channel, $values)`

Parameter | Type | Description
--- | --- | ---
$channel | `Object` | Current SpecialtyTemplate model object
$values | `Array` | The SpecialtyTemplate model object data as an array
Returns | `NULL` | void

Called after the specialty templateobject is inserted or updated. Changes made to the object will not be saved automatically. Calling save may fire additional hooks.

How it’s called:

    ee()->extensions->call('after_specialty_template_save', $this, $this->getValues());

### `before_specialty_template_delete($channel, $values)`

Parameter | Type | Description
--- | --- | ---
$channel | `Object` | Current SpecialtyTemplate model object
$values | `Array` | The SpecialtyTemplate model object data as an array
Returns | `NULL` | void

Called before the specialty templateobject is deleted. If you are conditionally deleting one of your own models, please consider creating an inverse relationship instead. This will provide better performance and strictly enforce data consistency.

How it’s called:

    ee()->extensions->call('before_specialty_template_delete', $this, $this->getValues());

### `after_specialty_template_delete($channel, $values)`

Parameter | Type | Description
--- | --- | ---
$channel | `Object` | Current SpecialtyTemplate model object
$values | `Array` | The SpecialtyTemplate model object data as an array
Returns | `NULL` | void

Called after the specialty templateobject is deleted. If you are conditionally deleting one of your own models, please consider creating an inverse relationship instead. This will provide better performance and strictly enforce data consistency.

How it’s called:

    ee()->extensions->call('after_specialty_template_delete', $this, $this->getValues());

New in version 5.3.0.