Sunday 15 September 2013

Zend 1.12 change value of specific decorator in FormElement -


I am providing a very simple look with a table format. For the first time, I add elements, then I set my basic decorators with the following:

  $ this-> SetElementDecorators (array '' viewhelper '', array (array ('data' = & gt; 'array' ('tag' = & gt; 'TD'), array ('tag' = & gt; 'td')), ' 'Array' (array ('line' = & gt; 'HtmlTag'), arrays ('tag' array '=' = & gt; 'right')), arrays (array '(' '' 'HtmlTag' After this, I manipulate the group of elements (desired) to set different views (array) ('tag' = & gt; 'tr')));   

I am doing this as follows: To group the group elements in a line, this is done as follows:

  $ this-> getElement ($ elementName) -> Setdicators (Array ('view Helper 'array' ('data' ('label' = 'array (' tag '=> gt;' td ',' align '= & gt;' right ')), array (array (' line '=' & Gt; 'HtmlTag', array ('tag' => gtc: 'tr')));   

As you're seeing, let me set setDecorators () to add again (with the default ones), so I add the 'data' decorator and attribute "colspan" . My question will be: what a single decorator It is possible to access without

You should be able to call: < / P>

  $ viewHelperDecorator = $ this-> GetElement ($ element name) - & gt; GetDecorator ('ViewHelper');   

Then, it's like another decorator (it's a decorator essence) - so that you can call

  $ viewHelperDecorator- & gt; SetOption ();   

and set the desired change.

No comments:

Post a Comment