Legacy Documentation
You are using the documentation for version 3.5.17. Go here for the latest version or check here for your available upgrades to the latest version.
Channel Entry Model Extension Hooks¶
before_channel_entry_insert¶
-
before_channel_entry_insert
($entry, $values)¶ Called before the channel entry object is inserted. Changes made to the object will be saved automatically.
How it’s called:
ee()->extensions->call('before_channel_entry_insert', $this, $this->getValues());
Parameters: - $entry (object) – Current ChannelEntry model object
- $values (array) – The ChannelEntry model object data as an array
Returns: void
Return type: NULL
New in version 3.1.0.
after_channel_entry_insert¶
-
after_channel_entry_insert
($entry, $values)¶ Called after the channel entry object 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_channel_entry_insert', $this, $this->getValues());
Parameters: - $entry (object) – Current ChannelEntry model object
- $values (array) – The ChannelEntry model object data as an array
Returns: void
Return type: NULL
New in version 3.1.0.
before_channel_entry_update¶
-
before_channel_entry_update
($entry, $values, $modified)¶ Called before the channel entry object is updated. Changes made to the object will be saved automatically.
How it’s called:
ee()->extensions->call('before_channel_entry_update', $this, $this->getValues(), $modified);
Parameters: - $entry (object) – Current ChannelEntry model object
- $values (array) – The ChannelEntry model object data as an array
- $modified (array) – An array of all the old values that were changed
Returns: void
Return type: NULL
New in version 3.1.0.
after_channel_entry_update¶
-
after_channel_entry_update
($entry, $values, $modified)¶ Called after the channel entry object 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_channel_entry_update', $this, $this->getValues(), $modified);
Parameters: - $entry (object) – Current ChannelEntry model object
- $values (array) – The ChannelEntry model object data as an array
- $modified (array) – An array of all the old values that were changed
Returns: void
Return type: NULL
New in version 3.1.0.
before_channel_entry_save¶
-
before_channel_entry_save
($entry, $values)¶ Called before the channel entry object is inserted or updated. Changes made to the object will be saved automatically.
How it’s called:
ee()->extensions->call('before_channel_entry_save', $this, $this->getValues());
Parameters: - $entry (object) – Current ChannelEntry model object
- $values (array) – The ChannelEntry model object data as an array
Returns: void
Return type: NULL
New in version 3.1.0.
after_channel_entry_save¶
-
after_channel_entry_save
($entry, $values)¶ Called after the channel entry object 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_channel_entry_save', $this, $this->getValues());
Parameters: - $entry (object) – Current ChannelEntry model object
- $values (array) – The ChannelEntry model object data as an array
Returns: void
Return type: NULL
New in version 3.1.0.
before_channel_entry_delete¶
-
before_channel_entry_delete
($entry, $values)¶ Called before the channel entry object 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_channel_entry_delete', $this, $this->getValues());
Parameters: - $entry (object) – Current ChannelEntry model object
- $values (array) – The ChannelEntry model object data as an array
Returns: void
Return type: NULL
New in version 3.1.0.
after_channel_entry_delete¶
-
after_channel_entry_delete
($entry, $values)¶ Called after the channel entry object 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_channel_entry_delete', $this, $this->getValues());
Parameters: - $entry (object) – Current ChannelEntry model object
- $values (array) – The ChannelEntry model object data as an array
Returns: void
Return type: NULL
New in version 3.1.0.