From 4fe46a2c6eb3ed0924fb6a6ee651dacb1be1f620 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 24 Jul 2014 08:45:38 +0200 Subject: [PATCH] Remove unnecessary properties and their getters/setters This kind of data is mainly prepared in the controller's action now or directly fetched in a concrete form implementation. refs #5525 --- .../Config/Authentication/BaseBackendForm.php | 89 ------------------- 1 file changed, 89 deletions(-) diff --git a/application/forms/Config/Authentication/BaseBackendForm.php b/application/forms/Config/Authentication/BaseBackendForm.php index 7a34f236a..9192b08c4 100644 --- a/application/forms/Config/Authentication/BaseBackendForm.php +++ b/application/forms/Config/Authentication/BaseBackendForm.php @@ -4,10 +4,8 @@ namespace Icinga\Form\Config\Authentication; -use \Zend_Config; use \Zend_Form_Element_Checkbox; use Icinga\Web\Form; -use Icinga\Data\ResourceFactory; use Icinga\Web\Form\Decorator\HelpText; /** @@ -15,93 +13,6 @@ use Icinga\Web\Form\Decorator\HelpText; */ abstract class BaseBackendForm extends Form { - /** - * The name of the backend currently displayed in this form - * - * Will be the section in the authentication.ini file - * - * @var string - */ - protected $backendName = ''; - - /** - * The backend configuration as a Zend_Config object - * - * @var Zend_Config - */ - protected $backend; - - /** - * The resources to use instead of the factory provided ones (use for testing) - * - * @var Zend_Config - */ - protected $resources; - - /** - * Set the name of the currently displayed backend - * - * @param string $name The name to be stored as the section when persisting - */ - public function setBackendName($name) - { - $this->backendName = $name; - } - - /** - * Return the backend name of this form - * - * @return string - */ - public function getBackendName() - { - return $this->backendName; - } - - /** - * Return the backend configuration or a empty Zend_Config object if none is given - * - * @return Zend_Config - */ - public function getBackend() - { - return ($this->backend !== null) ? $this->backend : new Zend_Config(array()); - } - - /** - * Set the backend configuration for initial population - * - * @param Zend_Config $backend The backend to display in this form - */ - public function setBackend(Zend_Config $backend) - { - $this->backend = $backend; - } - - /** - * Set an alternative array of resources that should be used instead of the DBFactory resource set - * - * @param array $resources The resources to use for populating the db selection field - */ - public function setResources(array $resources) - { - $this->resources = $resources; - } - - /** - * Return content of the resources.ini or previously set resources - * - * @return array - */ - public function getResources() - { - if ($this->resources === null) { - return ResourceFactory::getResourceConfigs()->toArray(); - } else { - return $this->resources; - } - } - /** * Add checkbox at the beginning of the form which allows to skip logic connection validation */