When creating form elements with Zend (using Zend Studio for Eclipse), I’d like some auto completion or hints. Here’s what I’m thinking. I’m sure these exist, but I don’t know how to get them.
-
I type
createElementand auto-completes gives me the signaturecreateElement($type, $name). Great, I select it. -
but when I try to set the
$typeI don’t get any hints likeDateTextBoxorValidationTextBox. Being new, I see how this can be useful. What do you do to remember all the options? -
for the
arrayof attributes likerequire,invalidMessage, I’d like to get a list of those to choose from, and/or auto-complete when I start typing one.// Date field$date = $this->createElement('DateTextBox', 'date',array('require' => 'true', 'invalidMessage' => 'Invalid date format'));$date->setLabel('date')->setRequired(true);
You have few options to help yourself, without waiting for any plugin:
Example (to be honest I don’t know if Eclipse supports html in phpDoc or even any text after variable name in @param, but it works fine in Netbeans):
Example:
Example: (type ZFE_OPTIONS and IDE should show hint with some constants to use as array keys)
Example: