Пример #1
0
 public function initialize()
 {
     parent::initialize();
     /* @var $worker \Nethgui\Controller\AbstractController */
     $this->worker = new RuleGenericController($this->getIdentifier());
     $this->worker->initializeFromAction($this);
     $this->workflow = new \NethServer\Module\FirewallRules\RuleWorkflow();
 }
Пример #2
0
 public function initialize()
 {
     parent::initialize();
     $this->state = new \NethServer\Module\FirewallRules\RuleWorkflow();
     $this->declareParameter('name', Validate::USERNAME);
     $this->declareParameter('IpAddress', Validate::IPv4);
     $this->declareParameter('Description', Validate::ANYTHING);
     $this->declareParameter('q', Validate::ANYTHING);
 }
 public function initialize()
 {
     parent::initialize();
     $this->state = new \NethServer\Module\FirewallRules\RuleWorkflow();
     $this->declareParameter('name', Validate::USERNAME);
     $this->declareParameter('Protocol', $this->createValidator()->memberOf($this->protocols));
     $this->declareParameter('Description', Validate::ANYTHING);
     $this->declareParameter('Ports', Validate::ANYTHING);
     $this->declareParameter('q', Validate::ANYTHING);
 }
 public function initialize()
 {
     parent::initialize();
     $membersValidator = $this->createValidator()->notEmpty()->collectionValidator($this->createValidator(Validate::USERNAME));
     $this->state = new \NethServer\Module\FirewallRules\RuleWorkflow();
     $this->declareParameter('name', Validate::USERNAME);
     $this->declareParameter('Members', $membersValidator);
     $this->declareParameter('Description', Validate::ANYTHING);
     $this->declareParameter('q', Validate::ANYTHING);
     $this->declareParameter('MembersDatasource', FALSE, array($this, 'provideMembersDatasource'));
 }
Пример #5
0
 public function initialize()
 {
     parent::initialize();
     $nameValidator = $this->getPlatform()->createValidator()->maxLength(5)->username();
     if (!$this->interfaces) {
         $this->interfaces = $this->readInterfaces();
     }
     $interfaceValidator = $this->getPlatform()->createValidator()->memberOf($this->interfaces);
     $this->state = new \NethServer\Module\FirewallRules\RuleWorkflow();
     $this->declareParameter('name', $nameValidator);
     $this->declareParameter('Network', Validate::CIDR_BLOCK);
     $this->declareParameter('Interface', $interfaceValidator);
     $this->declareParameter('Description', Validate::ANYTHING);
     $this->declareParameter('f', $this->createValidator()->memberOf('d', 's'));
     $this->declareParameter('i', Validate::POSITIVE_INTEGER);
     $this->declareParameter('q', Validate::ANYTHING);
 }
Пример #6
0
 public function initialize()
 {
     parent::initialize();
     $this->declareParameter('Rules', \Nethgui\System\PlatformInterface::ANYTHING_COLLECTION);
 }
Пример #7
0
 public function initialize()
 {
     parent::initialize();
     $this->declareParameter('groups', Validate::ANYTHING_COLLECTION);
 }
Пример #8
0
 public function initialize()
 {
     parent::initialize();
     $this->declareParameter('ruleId', FALSE);
 }
Пример #9
0
 public function initialize()
 {
     parent::initialize();
     $this->declareParameter('removeGroup', \Nethgui\System\PlatformInterface::ANYTHING);
 }