Skip to content

Using instance Zend_Form_Element instead of directly adding an element to the form.#3

Open
wendrowycz wants to merge 35 commits intozfbase:masterfrom
wendrowycz:master
Open

Using instance Zend_Form_Element instead of directly adding an element to the form.#3
wendrowycz wants to merge 35 commits intozfbase:masterfrom
wendrowycz:master

Conversation

@wendrowycz
Copy link

In our projects, we use object instances Zend_Form_Elements instead of directly adding them to the form. Thanks to keep the transparency of the code and it is easier to manage. Since decorators in this case were not supported, I overwrite standard method addElement to handle this in a way as direct adding form elements.

wendrowycz and others added 30 commits June 21, 2016 06:53
Using objects
Merge branch 'hotfix/file_decorator'
Solve error with strict standards: Only variables should be passed by reference
* Prevent PHP (7) Error

Solve error with strict standards: Only variables should be passed by reference

* Remove dimensions if any
Twitter_Bootstrap3_View_Helper_FormReset must be setup in the same way Zend_View_Helper_FormReset is setup, otherwise this will cause exception.
If adding elements to a form, class is lost. This is especially true for selects and such elements, which do not have a special view helper.
Added manual assignment of class if class is given.
* Prevent PHP (7) Error

Solve error with strict standards: Only variables should be passed by reference

* Remove dimensions if any

* Comply with Zend_View_Helper_FormReset

Twitter_Bootstrap3_View_Helper_FormReset must be setup in the same way Zend_View_Helper_FormReset is setup, otherwise this will cause exception.

* Add support for "class" attrib

If adding elements to a form, class is lost. This is especially true for selects and such elements, which do not have a special view helper.
Added manual assignment of class if class is given.
Get current state from upper fork.
They use HTML inside quite often - disable escaping globally.
Add inline form with label. Use it like: $form = new Twitter_Bootstrap3_Form_Inlinelabel;
Add possibility to add a class to the div around the input to the form-group class by attribute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants