We shouldn't require Form::createElements() to return self

refs #5525
This commit is contained in:
Johannes Meyer 2014-09-08 09:24:53 +02:00
parent 7215e273f6
commit 930e6e7d71
22 changed files with 3 additions and 47 deletions

View File

@ -53,7 +53,5 @@ class LoginForm extends Form
'value' => Url::fromRequest()->getParam('redirect')
)
);
return $this;
}
}

View File

@ -69,8 +69,6 @@ class AutologinBackendForm extends Form
'value' => 'autologin'
)
);
return $this;
}
/**

View File

@ -77,8 +77,6 @@ class DbBackendForm extends Form
'value' => 'db'
)
);
return $this;
}
/**

View File

@ -96,8 +96,6 @@ class LdapBackendForm extends Form
'value' => 'ldap'
)
);
return $this;
}
/**

View File

@ -318,7 +318,5 @@ class AuthenticationBackendConfigForm extends ConfigForm
}
$this->addElements($this->getBackendForm($backendType)->createElements($formData)->getElements());
return $this;
}
}

View File

@ -112,7 +112,5 @@ class ApplicationConfigForm extends Form
)
);
}
return $this;
}
}

View File

@ -102,8 +102,6 @@ class LoggingConfigForm extends Form
)
);
}
return $this;
}
/**

View File

@ -33,8 +33,6 @@ class GeneralConfigForm extends ConfigForm
$loggingConfigForm = new LoggingConfigForm();
$this->addElements($appConfigForm->createElements($formData)->getElements());
$this->addElements($loggingConfigForm->createElements($formData)->getElements());
return $this;
}
/**

View File

@ -92,8 +92,6 @@ class DbResourceForm extends Form
'description' => t('The password to use for authentication')
)
);
return $this;
}
/**

View File

@ -44,7 +44,5 @@ class FileResourceForm extends Form
'description' => t('The regular expression by which to identify columns')
)
);
return $this;
}
}

View File

@ -78,8 +78,6 @@ class LdapResourceForm extends Form
'description' => t('The password to use for querying the ldap server')
)
);
return $this;
}
/**

View File

@ -39,8 +39,6 @@ class LivestatusResourceForm extends Form
'value' => realpath(Icinga::app()->getApplicationDir() . '/../var/rw/livestatus')
)
);
return $this;
}
/**

View File

@ -48,7 +48,5 @@ class StatusdatResourceForm extends Form
'validators' => array(new ReadablePathValidator())
)
);
return $this;
}
}

View File

@ -252,7 +252,5 @@ class ResourceConfigForm extends ConfigForm
}
$this->addElements($this->getResourceForm($resourceType)->createElements($formData)->getElements());
return $this;
}
}

View File

@ -100,8 +100,6 @@ class AddUrlForm extends Form
'helptext' => t('The title for the dashlet')
)
);
return $this;
}
/**

View File

@ -206,8 +206,6 @@ class PreferenceForm extends Form
'label' => t('Use benchmark')
)
);
return $this;
}
/**

View File

@ -304,8 +304,8 @@ class Form extends Zend_Form
public function create(array $formData = array())
{
if (false === $this->created) {
$this->createElements($formData)
->addFormIdentification()
$this->createElements($formData);
$this->addFormIdentification()
->addCsrfCounterMeasure()
->addSubmitButton();
@ -327,12 +327,10 @@ class Form extends Zend_Form
* Intended to be implemented by concrete form classes.
*
* @param array $formData The data sent by the user
*
* @return self
*/
public function createElements(array $formData)
{
return $this;
}
/**

View File

@ -238,7 +238,5 @@ class BackendConfigForm extends ConfigForm
'multiOptions' => $this->resources[$resourceType]
)
);
return $this;
}
}

View File

@ -31,7 +31,5 @@ class LocalInstanceForm extends Form
'description' => t('The file path where the icinga commandpipe can be found')
)
);
return $this;
}
}

View File

@ -62,7 +62,5 @@ class RemoteInstanceForm extends Form
'description' => t('The file path where the icinga commandpipe can be found')
)
);
return $this;
}
}

View File

@ -205,7 +205,5 @@ class InstanceConfigForm extends ConfigForm
);
$this->addElements($this->getInstanceForm($instanceType)->createElements($formData)->getElements());
return $this;
}
}

View File

@ -62,7 +62,5 @@ class SecurityConfigForm extends ConfigForm
. ' Existance of those custom variables will be shown, but their values will be masked.'
)
);
return $this;
}
}