Like we can do $this->partial(); or $this->render() with Zend Framework. How can i make my own $this->myOwnStuff(); ?
Example:
Before:
<tr>
<td>label</td>
<td>value1</td>
</tr>
<tr>
<td>label2</td>
<td>value2</td>
</tr>
After:
$this->tr(
array(
"label"=>"value1", "value"=> "value1"
"label"=>"value2", "value"=> "value2"
)
);
It’s pretty easy. If you want to create a helper, just create a new helper class and plot it in
/application/views/helpers. Of if you’re structuring it so that you have your own library putting it inlibrary/My_Library/View/Helperwill also work.Make sure to extend from the base helper abstract. Something along the lines of
Here’s an article that goes into greater detail about the matter : http://devzone.zend.com/article/3412