Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

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