Retired Documentation
You are using the documentation for version 2.11.9. Go here for the latest version or check here for your available upgrades to the latest version.
Content Publish Controller Extension Hooks¶
entry_submission_absolute_end¶
-
entry_submission_absolute_end
($entry_id, $meta, $data, $view_url)¶ Additional processing after entry submission, after all processing, prior to redirect.
How it’s called:
// In system/expressionengine/controllers/cp/content_publish.php if ($this->api_channel_entries->trigger_hook('entry_submission_absolute_end', $view_url) === TRUE) { return TRUE; } ... // In system/expressionengine/libraries/api/Api_channel_entries.php ee()->extensions->call('entry_submission_absolute_end', $this->entry_id, $this->meta, $this->data, $orig_var); ... if (ee()->extensions->end_script === TRUE) { return TRUE; }
Parameters: - $entry_id (int) – Entry ID of submitted entry
- $meta (array) – Entry’s metadata (
channel_id
,entry_date
, i.e. fields forexp_channel_titles
) - $data (array) – Entry’s field data
- $view_url (string) – Control Panel URL to view submitted entry
Return type: Void
Set
ee()->extensions->end_script
toTRUE
to prevent an automatic redirect to the$view_url
.New in version 2.0.
entry_submission_redirect¶
-
entry_submission_redirect
($entry_id, $meta, $data, $cp_call, $view_url)¶ Set the URL that the user will be redirected to after a successful entry submission.
How it’s called:
// In system/expressionengine/controllers/cp/content_publish.php $view_url = $this->api_channel_entries->trigger_hook('entry_submission_redirect', $view_url); ... // In system/expressionengine/libraries/api/Api_channel_entries.php $loc = $this->extensions->call('entry_submission_redirect', $this->entry_id, $this->meta, $this->data, $cp_call, $orig_loc); if (ee()->extensions->end_script === TRUE) { return $loc; } return $loc;
Parameters: - $entry_id (int) – Entry ID of submitted entry
- $meta (array) – Entry’s metadata (
channel_id
,entry_date
, i.e. fields forexp_channel_titles
) - $data (array) – Entry’s field data
- $cp_call (boolean) –
TRUE
if the call came from the control panel - $view_url (string) – Control Panel URL to view submitted entry
Returns: URL to return to instead of
$view_url
Return type: String
New in version 2.0.
foreign_character_conversion_array¶
-
foreign_character_conversion_array
()¶ Allows you to set the foreign character conversion array used to transliterate non-English characters for use in URLs.
How it’s called:
$foreign_characters = $CI->extensions->call('foreign_character_conversion_array');
Returns: Array of character ASCII values as keys and what they should translate to as values Return type: String Note
If you only need to use one non-dynamically controlled array, you can simply modify
system/expressionengine/config/foreign_chars.php
New in version 2.0.
publish_form_channel_preferences¶
-
publish_form_channel_preferences
($row)¶ Allows modification of channel preferences used on the publish form page.
How it’s called:
$row = $this->extensions->call('publish_form_channel_preferences', $row);
Parameters: - $row (array) – Selected channel preferences
Returns: Manipulated channel preferences (
$row
)Return type: Array
New in version 1.4.1.
publish_form_entry_data¶
-
publish_form_entry_data
($result)¶ Allows modification of entry data for the publish form when editing an existing entry.
How it’s called:
$result = $this->extensions->call('publish_form_entry_data', $result);
Parameters: - $result (array) – Entry data
Returns: Manipulated entry data (
$result
)Return type: Array
New in version 1.4.1.