Answer the question
In order to leave comments, you need to log in
Overriding a function in Zend Framework?
How can you override the createData method in the Zend_View_Helper_HeadScript class without touching the framework core?
the class file itself is located in library/Zend/View/Helper/HeadScript.php, you need to slightly change the $attributes parameter:
class Zend_View_Helper_HeadScript extends Zend_View_Helper_Placeholder_Container_Standalone {
...
public function createData($type, array $attributes, $content = null)
{
$data = new stdClass();
$data->type = $type;
$data->attributes = $attributes;
$data->source = $content;
return $data;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question