I’m creating an extension that uses the edit_template_start hook. When I open a new template I’m getting the following error:
A PHP Error was encountered
Severity: Warning
Message: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Eehive_boilerplate_ext::boilerplate_template' was given
Filename: libraries/Extensions.php
Line Number: 261The important code is below:
public function activate_extension()
{
// Setup custom settings in this array.
$this->settings = array();
$data = array(
'class' => __CLASS__,
'method' => 'boilerplate_template',
'hook' => 'edit_template_start',
'settings' => serialize($this->settings),
'version' => $this->version,
'enabled' => 'y'
);
$this->EE->db->insert('extensions', $data);
}
// ----------------------------------------------------------------------
/**
* boilerplate_template
*
* @param
* @return
*/
function boilerplate_template($query, $template_id, $message) {
}Am I not using the hook correctly? Any help is appreciated. Thanks!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.