The logic is still the same, but you have to register your helper with the
view helper plugin manager. You can take a look at my OcraLoremModule
repository at https://github.com/Ocramius/OcraLoremModule, which registers
two helpers

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 3 February 2013 20:46, Amino [via Zend Framework Community] <
[email protected]> wrote:

> Hello There,
>
> I am about to migrate from zend 10.11 to Zend 2 but having problem with
> the helpers.
>
> Could anyone say how to convert this code that I could use within the
> views:
> ----------------------------------------------
> class Zend_View_Helper_Hello extends Zend_View_Helper_Abstract
> {
>     public function Shorten($text){
>         return $text;
>         }
> }
> ------------------
> To refere to the above helper in the view here is how it is invoked:
> $this->Hello(stripslashes("Hello world");
>
> Be the one who could save my time:)
> -Amino
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://zend-framework-community.634137.n4.nabble.com/View-Helpers-Zend-2-tp4658937.html
>  To start a new topic under Zend Framework, email
> [email protected]
> To unsubscribe from Zend Framework Community, click 
> here<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=634137&code=b2NyYW1pdXNAZ21haWwuY29tfDYzNDEzN3wxNzE0OTI1MTk4>
> .
> NAML<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/View-Helpers-Zend-2-tp4658937p4658938.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to