/** * Ensures that name does not contain brackets [] to be able to address it * via plain name * * @throws FormException In case the name of the control contains brackets. * * @author Ralf Schubert * @version * Version 0.1, 24.01.2014<br /> */ public function onParseTime() { $name = $this->getAttribute('name'); if (substr($name, -2) === '[]') { $form = $this->getForm(); $doc = $form->getParentObject(); $docCon = get_class($doc->getDocumentController()); throw new FormException('[FileUploadTag::onParseTime()] The attribute "name" of the ' . '<form:file /> tag with name "' . $name . '" in form "' . $form->getAttribute('name') . '" and document ' . 'controller "' . $docCon . '" must not contain brackets! Please ensure, that the ' . 'appropriate form control has a suitable name. The brackets are automatically ' . 'generated by the taglib if needed!', E_USER_ERROR); } parent::onParseTime(); }
public function onParseTime() { parent::onParseTime(); $this->onParseTimeExecuted = true; }