SyncPropertyForm: allow to set SyncRule

This commit is contained in:
Thomas Gelf 2015-11-02 09:32:05 +01:00
parent 326a88fc81
commit a971063ea1

View File

@ -3,10 +3,20 @@
namespace Icinga\Module\Director\Forms; namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\Web\Form\DirectorObjectForm; use Icinga\Module\Director\Web\Form\DirectorObjectForm;
use Icinga\Web\Hook; use Icinga\Exception\InvalidPropertyException;
use Icinga\Module\Director\Objects\SyncRule;
use Icinga\Module\Director\Objects\ImportSource;
use Icinga\Module\Director\Web\Hook\ImportSourceHook;
class SyncPropertyForm extends DirectorObjectForm class SyncPropertyForm extends DirectorObjectForm
{ {
/**
* @var SyncRule
*/
private $rule;
private $importSource;
public function setup() public function setup()
{ {
$this->addElement('select', 'rule_id', array( $this->addElement('select', 'rule_id', array(
@ -55,4 +65,10 @@ class SyncPropertyForm extends DirectorObjectForm
)); ));
} }
public function setRule(SyncRule $rule)
{
$this->rule = $rule;
return $this;
}
} }