public function initialize() { $parameterSchema = array(array('port', Validate::PORTNUMBER, \Nethgui\Controller\Table\Modify::KEY), array('Priority', $this->createValidator()->memberOf(array("1", "2", "3")), \Nethgui\Controller\Table\Modify::FIELD), array('Proto', $this->createValidator()->memberOf($this->protocols), \Nethgui\Controller\Table\Modify::FIELD), array('Description', $this->createValidator()->maxLength(35), \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); $this->setDefaultValue('Proto', 'tcp'); parent::initialize(); }
public function initialize() { $columns = array('Key', 'Description', 'Actions'); $parameterSchema = array(array('name', Validate::USERNAME, \Nethgui\Controller\Table\Modify::KEY), array('Domains', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { parent::initialize(); $this->setViewTemplate('NethServer\\Template\\NetworkServices\\Modify'); $parameterSchema = array(array('name', Validate::ANYTHING, Table::KEY), array('status', Validate::SERVICESTATUS, Table::FIELD), array('access', Validate::ANYTHING, Table::FIELD, 'access', ',')); $this->setSchema($parameterSchema); }
public function initialize() { parent::initialize(); $this->setViewTemplate('NethServer\\Template\\NetworkServices\\Modify'); $parameterSchema = array(array('name', Validate::ANYTHING, Table::KEY), array('status', Validate::SERVICESTATUS, Table::FIELD), array('access', $this->createValidator()->memberOf($this->access_values), Table::FIELD), array('AllowHosts', Validate::ANYTHING, Table::FIELD), array('DenyHosts', Validate::ANYTHING, Table::FIELD)); $this->setSchema($parameterSchema); }
public function initialize() { $parameterSchema = array(array('SrcRaw', $this->createValidator()->platform('firewall-object-exists'), \Nethgui\Controller\Table\Modify::KEY), array('Priority', $this->createValidator()->memberOf(array("1", "2", "3")), \Nethgui\Controller\Table\Modify::FIELD), array('Description', $this->createValidator()->maxLength(35), \Nethgui\Controller\Table\Modify::FIELD)); $this->setCreateDefaults(array('Priority' => '1', 'Description' => '')); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { $interfaces = $this->getPlatform()->getDatabase('networks')->getAll('ethernet'); $parameterSchema = array(array('device', $this->createValidator()->memberOf(array_keys($interfaces)), \Nethgui\Controller\Table\Modify::KEY), array('In', Validate::POSITIVE_INTEGER, \Nethgui\Controller\Table\Modify::FIELD), array('Out', Validate::POSITIVE_INTEGER, \Nethgui\Controller\Table\Modify::FIELD), array('Description', $this->createValidator()->maxLength(35), \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { $dvalidator = $this->createValidator()->collectionValidator($this->createValidator()->memberOf($this->days)); $parameterSchema = array(array('name', Validate::USERNAME, \Nethgui\Controller\Table\Modify::KEY), array('Days', $dvalidator, \Nethgui\Controller\Table\Modify::FIELD, 'Days', ','), array('StartTime', Validate::TIME, \Nethgui\Controller\Table\Modify::FIELD), array('EndTime', Validate::TIME, \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { $this->prepareVars(); $parameterSchema = array(array('name', Validate::USERNAME, \Nethgui\Controller\Table\Modify::KEY), array('Host', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('status', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); $this->setDefaultValue('status', 'enabled'); parent::initialize(); }
public function initialize() { $parameterSchema = array(array('domain', Validate::HOSTNAME_FQDN, Table::KEY), array('Description', Validate::ANYTHING, Table::FIELD), array('TransportType', Validate::ANYTHING, Table::FIELD), array('DisclaimerStatus', Validate::SERVICESTATUS, Table::FIELD)); $this->declareParameter('DisclaimerText', $this->createValidator()->maxLength(self::DISCLAIMER_MAX_LENGTH), $this->getPlatform()->getMapAdapter(array($this, 'readDisclaimerFile'), array($this, 'writeDisclaimerFile'), array())); $this->setSchema($parameterSchema); $this->setDefaultValue('TransportType', 'Relay'); parent::initialize(); }
public function initialize() { $p = $this->getPlatform(); $vn = $p->createValidator()->orValidator($p->createValidator()->cidrBlock(), $p->createValidator()->memberOf(array('0.0.0.0/0', 'default'))); $vd = $p->createValidator()->memberOf($this->listInterfaces()); $vm = $p->createValidator()->orValidator($p->createValidator(Validate::EMPTYSTRING), $this->createValidator(Validate::NONNEGATIVE_INTEGER)); $parameterSchema = array(array('network', $vn, \Nethgui\Controller\Table\Modify::KEY), array('Router', Validate::IPv4, \Nethgui\Controller\Table\Modify::FIELD), array('Device', $vd, \Nethgui\Controller\Table\Modify::FIELD), array('Metric', $vm, \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { $parameterSchema = array(array('name', Validate::USERNAME, \Nethgui\Controller\Table\Modify::KEY), array('Mode', $this->createValidator()->memberOf(array('routed', 'bridged')), \Nethgui\Controller\Table\Modify::FIELD), array('Password', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('RemoteHost', Validate::HOSTADDRESS, \Nethgui\Controller\Table\Modify::FIELD), array('RemotePort', Validate::PORTNUMBER, \Nethgui\Controller\Table\Modify::FIELD), array('User', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('Compression', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('VPNType', $this->createValidator()->memberOf(array('openvpn', 'ipsec')), \Nethgui\Controller\Table\Modify::FIELD), array('AuthMode', $this->createValidator()->memberOf(array('certificate', 'password', 'psk', 'password-certificate')), \Nethgui\Controller\Table\Modify::FIELD)); $this->declareParameter('Crt', Validate::ANYTHING, $this->getPlatform()->getMapAdapter(array($this, 'readCrtFile'), array($this, 'writeCrtFile'), array())); $this->declareParameter('Psk', Validate::ANYTHING, $this->getPlatform()->getMapAdapter(array($this, 'readPskFile'), array($this, 'writePskFile'), array())); $this->setSchema($parameterSchema); $this->setDefaultValue('Mode', 'routed'); $this->setDefaultValue('VPNType', 'openvpn'); $this->setDefaultValue('AuthMode', 'certificate'); parent::initialize(); }
public function initialize() { $ynv = $this->createValidator()->memberOf(array('YES', 'NO')); $parameterSchema = array(array('mail', Validate::EMAIL, \Nethgui\Controller\Table\Modify::KEY), array('account', Validate::USERNAME, \Nethgui\Controller\Table\Modify::FIELD), array('nokeep', $ynv, \Nethgui\Controller\Table\Modify::FIELD), array('password', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('popserver', Validate::HOSTADDRESS, \Nethgui\Controller\Table\Modify::FIELD), array('username', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('ssl', $ynv, \Nethgui\Controller\Table\Modify::FIELD), array('proto', $this->createValidator()->memberOf(array('pop3', 'imap')), \Nethgui\Controller\Table\Modify::FIELD), array('active', $ynv, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); $this->setDefaultValue('nokeep', 'YES'); $this->setDefaultValue('active', 'YES'); $this->setDefaultValue('ssl', 'NO'); $this->setDefaultValue('proto', 'pop3'); parent::initialize(); }
public function initialize() { $quotaValidator1 = $this->createValidator()->greatThan(0)->lessThan(501); $quotaValidator2 = $this->createValidator()->equalTo('unlimited'); $this->declareParameter('QuotaStatus', FALSE, array('configuration', 'dovecot', 'QuotaStatus')); $parameterSchema = array(array('username', Validate::ANYTHING, Table::KEY), array('MailStatus', Validate::SERVICESTATUS, Table::FIELD), array('MailQuotaType', $this->createValidator()->memberOf('custom', 'default'), Table::FIELD), array('MailQuotaCustom', $this->createValidator()->orValidator($quotaValidator1, $quotaValidator2), Table::FIELD), array('MailForwardStatus', Validate::SERVICESTATUS, Table::FIELD), array('MailForwardAddress', Validate::EMAIL, Table::FIELD), array('MailForwardKeepMessageCopy', Validate::YES_NO, Table::FIELD), array('MailSpamRetentionStatus', Validate::SERVICESTATUS, Table::FIELD), array('MailSpamRetentionTime', '/^(\\d+[smhdw]|infinite)$/', Table::FIELD)); $this->setSchema($parameterSchema); $this->setDefaultValue('MailStatus', 'enabled'); $this->setDefaultValue('MailSpamRetentionTime', '15d'); parent::initialize(); }
public function initialize() { if (!$this->interfaces) { $this->interfaces = $this->readInterfaces(); } $nameValidator = $this->getPlatform()->createValidator()->maxLength(5)->username(); $interfaceValidator = $this->getPlatform()->createValidator()->memberOf($this->interfaces); $parameterSchema = array(array('name', $nameValidator, \Nethgui\Controller\Table\Modify::KEY), array('Network', Validate::CIDR_BLOCK, \Nethgui\Controller\Table\Modify::FIELD), array('Interface', $interfaceValidator, \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { // The group name must satisfy the USERNAME generic grammar: if ($this->getIdentifier() === 'create') { $groupNameValidator = $this->createValidator(Validate::USERNAME)->platform('group-create'); } else { $groupNameValidator = FALSE; } $parameterSchema = array(array('groupname', $groupNameValidator, Table::KEY), array('Description', Validate::ANYTHING, Table::FIELD, 'Description'), array('Members', Validate::USERNAME_COLLECTION, Table::FIELD, 'Members', ','), array('MembersDatasource', FALSE, array($this, 'provideMembersDatasource'))); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { $keyValidator = $this->createValidator()->orValidator($this->createValidator()->regexp('/^[A-Za-z0-9_-](\\.?[A-Za-z0-9_-]+)*@$/i'), $this->createValidator()->email())->maxLength(196); $parameterSchema = array(array('pseudonym', $keyValidator, Table::KEY), array('Description', Validate::ANYTHING, Table::FIELD), array('Account', Validate::ANYTHING, Table::FIELD, 'Account', ','), array('Access', $this->createValidator()->memberOf('public', 'private'), Table::FIELD)); $this->setSchema($parameterSchema); $this->declareParameter('localAddress', Validate::NOTEMPTY); $this->declareParameter('domainAddress', Validate::ANYTHING); $this->declareParameter('ExtAddresses', '/^[^\\|]*$/'); $this->setDefaultValue('localAddress', ''); $this->setDefaultValue('domainAddress', ''); parent::initialize(); }
public function initialize() { // The group name must satisfy the USERNAME generic grammar: if ($this->getIdentifier() === 'create') { $groupNameValidator = $this->createValidator(Validate::USERNAME); } else { $groupNameValidator = FALSE; } $parameterSchema = array(array('groupname', $groupNameValidator, Table::KEY), array('members', Validate::ANYTHING, Table::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { $columns = array('Key', 'checkip', 'interface', 'weight', 'Description'); if (!$this->interfaces) { $this->interfaces = $this->readInterfaces(); } $p = $this->getPlatform(); $nv = $p->createValidator()->maxLength(5)->minLength(1); $parameterSchema = array(array('name', $nv, \Nethgui\Controller\Table\Modify::KEY), array('interface', $p->createValidator()->memberOf($this->interfaces), \Nethgui\Controller\Table\Modify::FIELD), array('weight', $this->createValidator()->integer()->greatThan(0)->lessThan(256), \Nethgui\Controller\Table\Modify::FIELD), array('checkip', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('status', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); $this->setDefaultValue('status', 'enabled'); parent::initialize(); }
public function initialize() { $portRangeValidator = $this->createValidator()->orValidator($this->createValidator()->integer()->greatThan(0)->lessThan(65535), $this->createValidator()->regexp('/^[0-9]+\\:[0-9]+$/')); $dstValidator = $this->createValidator()->orValidator($this->createValidator()->integer()->greatThan(0)->lessThan(65535), $this->createValidator()->isEmpty()); $protoValidator = $this->createValidator()->memberOf($this->protocols); if (!$this->wanips) { $this->wanips = $this->readWanIPs(); } $parameterSchema = array(array('id', FALSE, \Nethgui\Controller\Table\Modify::KEY), array('Proto', $protoValidator, \Nethgui\Controller\Table\Modify::FIELD), array('Src', $portRangeValidator, \Nethgui\Controller\Table\Modify::FIELD), array('Dst', $dstValidator, \Nethgui\Controller\Table\Modify::FIELD), array('DstRaw', $this->createValidator()->platform('firewall-object-exists'), \Nethgui\Controller\Table\Modify::FIELD, 'DstHost'), array('OriDst', Validate::IPv4_OR_EMPTY, \Nethgui\Controller\Table\Modify::FIELD), array('status', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('Allow', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('Description', $this->createValidator()->maxLength(35), \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); $this->setDefaultValue('Proto', 'tcp'); $this->setDefaultValue('status', 'enabled'); $this->setDefaultValue('OriDst', ''); parent::initialize(); }
public function initialize() { /* * Refs #941, #1536. Avoid deletion of Primary ibay */ if ($this->getIdentifier() === 'delete') { $ibayNameValidator = $this->createValidator(Validate::USERNAME)->platform('ibay-delete'); } elseif ($this->getIdentifier() === 'create') { $ibayNameValidator = $this->createValidator(Validate::USERNAME)->platform('ibay-create'); } else { $ibayNameValidator = FALSE; } $parameterSchema = array(array('ibay', $ibayNameValidator, Table::KEY), array('Description', Validate::ANYTHING, Table::FIELD), array('OwningGroup', Validate::USERNAME, Table::FIELD), array('OwnersDatasource', false, null), array('GroupAccess', '/^rw?$/', Table::FIELD), array('OtherAccess', '/^r?$/', Table::FIELD), array('AclRead', Validate::USERNAME_COLLECTION, Table::FIELD, 'AclRead', ','), array('AclWrite', Validate::USERNAME_COLLECTION, Table::FIELD, 'AclWrite', ','), array('AclSubjects', FALSE, null)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { parent::initialize(); // after parent's initialization we have Platform correctly set up. if (in_array($this->getIdentifier(), array('create', 'update'))) { $this->setViewTemplate('NethServer\\Template\\User\\Modify'); } elseif ($this->getIdentifier() === 'delete') { $this->setViewTemplate('Nethgui\\Template\\Table\\Delete'); } // The user name must satisfy the USERNAME generic grammar: if ($this->getIdentifier() === 'create') { $userNameValidator = $this->createValidator(Validate::USERNAME); } else { $userNameValidator = FALSE; } $parameterSchema = array(array('username', $userNameValidator, Table::KEY), array('gecos', Validate::NOTEMPTY, Table::FIELD), array('groups', Validate::ANYTHING, Table::FIELD), array('expires', $this->createValidator()->memberOf('yes', 'no'), Table::FIELD), array('shell', $this->createValidator()->memberOf('/bin/bash', '/usr/libexec/openssh/sftp-server'), Table::FIELD), array('setPassword', Validate::SERVICESTATUS), array('newPassword', Validate::ANYTHING), array('confirmNewPassword', Validate::ANYTHING)); $this->setSchema($parameterSchema); }
public function initialize() { parent::initialize(); // after parent's initialization we have Platform correctly set up. if (in_array($this->getIdentifier(), array('create', 'update'))) { $this->setViewTemplate('NethServer\\Template\\User\\Modify'); } elseif ($this->getIdentifier() === 'delete') { $this->setViewTemplate('Nethgui\\Template\\Table\\Delete'); } // The user name must satisfy the USERNAME generic grammar: if ($this->getIdentifier() === 'create') { $userNameValidator = $this->createValidator(Validate::USERNAME)->platform('user-create'); } else { $userNameValidator = FALSE; } $parameterSchema = array(array('username', $userNameValidator, Table::KEY), array('FirstName', Validate::NOTEMPTY, Table::FIELD), array('LastName', Validate::NOTEMPTY, Table::FIELD), array('Company', Validate::ANYTHING, Table::FIELD), array('Department', Validate::ANYTHING, Table::FIELD), array('Street', Validate::ANYTHING, Table::FIELD), array('City', Validate::ANYTHING, Table::FIELD), array('PhoneNumber', Validate::ANYTHING, Table::FIELD)); $this->setSchema($parameterSchema); }
public function initialize() { $yn = $this->createValidator()->memberOf(array('yes', 'no')); $ac = $this->createValidator()->memberOf(array('auto', 'custom')); $i_names = array(); foreach (array_keys($this->getNetworkInterfaces()) as $key) { $i_names[] = "%{$key}"; } $lc = $this->createValidator()->memberOf($i_names); $rv = $this->createValidator()->orValidator($this->createValidator(Validate::IPv4), $this->createValidator()->equalTo('%any')); $idv = $this->createValidator()->maxLength(63); $parameterSchema = array(array('name', Validate::USERNAME, \Nethgui\Controller\Table\Modify::KEY), array('left', $lc, \Nethgui\Controller\Table\Modify::FIELD), array('leftsubnets', Validate::NOTEMPTY, \Nethgui\Controller\Table\Modify::FIELD), array('leftid', $idv, \Nethgui\Controller\Table\Modify::FIELD), array('right', $rv, \Nethgui\Controller\Table\Modify::FIELD), array('rightsubnets', Validate::NOTEMPTY, \Nethgui\Controller\Table\Modify::FIELD), array('rightid', $idv, \Nethgui\Controller\Table\Modify::FIELD), array('psk', $this->createValidator()->minLength(6), \Nethgui\Controller\Table\Modify::FIELD), array('ikelifetime', Validate::POSITIVE_INTEGER, \Nethgui\Controller\Table\Modify::FIELD), array('salifetime', Validate::POSITIVE_INTEGER, \Nethgui\Controller\Table\Modify::FIELD), array('ike', $ac, \Nethgui\Controller\Table\Modify::FIELD), array('ikecipher', $this->createValidator()->memberOf($this->ciphers), \Nethgui\Controller\Table\Modify::FIELD), array('ikehash', $this->createValidator()->memberOf($this->hashes), \Nethgui\Controller\Table\Modify::FIELD), array('ikepfsgroup', $this->createValidator()->memberOf($this->pfsgroups), \Nethgui\Controller\Table\Modify::FIELD), array('esp', $ac, \Nethgui\Controller\Table\Modify::FIELD), array('espcipher', $this->createValidator()->memberOf($this->ciphers), \Nethgui\Controller\Table\Modify::FIELD), array('esphash', $this->createValidator()->memberOf($this->hashes), \Nethgui\Controller\Table\Modify::FIELD), array('esppfsgroup', $this->createValidator()->memberOf($this->pfsgroups), \Nethgui\Controller\Table\Modify::FIELD), array('status', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('pfs', $yn, \Nethgui\Controller\Table\Modify::FIELD), array('compress', $yn, \Nethgui\Controller\Table\Modify::FIELD), array('dpdaction', $this->createValidator()->memberOf(array('restart', 'hold')), \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); $this->setDefaultValue('status', 'enabled'); $this->setDefaultValue('ike', 'auto'); $this->setDefaultValue('esp', 'auto'); $this->setDefaultValue('compress', 'no'); $this->setDefaultValue('pfs', 'yes'); $this->setDefaultValue('dpdaction', 'hold'); $this->setDefaultValue('ikelifetime', '86400'); $this->setDefaultValue('salifetime', '3600'); $this->setDefaultValue('leftsubnets', implode(",", $this->readNetworks())); parent::initialize(); }
public function initialize() { $columns = array('Key', 'Description', 'Actions'); $this->prepareVars(); $parameterSchema = array(array('name', Validate::USERNAME, \Nethgui\Controller\Table\Modify::KEY), array('Src', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('Filter', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('Time', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); $this->setDefaultValue('Time', ''); $this->setDefaultValue('Filter', 'filter;default'); parent::initialize(); }
public function initialize() { $parameterSchema = array(array('name', Validate::USERNAME, \Nethgui\Controller\Table\Modify::KEY), array('Protocol', $this->createValidator()->memberOf($this->protocols), \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD), array('Ports', Validate::NOTEMPTY, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { if (!$this->categories) { $this->readCategories(); } $cvalidator = $this->createValidator(Validate::ANYTHING_COLLECTION)->collectionValidator($this->createValidator()->memberOf($this->categories)); $parameterSchema = array(array('name', Validate::USERNAME, \Nethgui\Controller\Table\Modify::KEY), array('BlockAll', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('BlockIpAccess', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('BlockFileTypes', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('BlockBuiltinRules', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('WhiteList', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('BlackList', Validate::SERVICESTATUS, \Nethgui\Controller\Table\Modify::FIELD), array('Categories', $cvalidator, \Nethgui\Controller\Table\Modify::FIELD, 'Categories', ','), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); $this->setDefaultValue('BlockAll', 'disabled'); $this->setDefaultValue('BlockIpAccess', 'enabled'); $this->setDefaultValue('BlockBuiltinRules', 'enabled'); parent::initialize(); }
public function initialize() { $parameterSchema = array(array('name', $this->createValidator()->orValidator($this->createValidator(Validate::USERNAME), $this->createValidator(Validate::HOSTADDRESS))->platform('vpn-create'), \Nethgui\Controller\Table\Modify::KEY), array('VPNRemoteNetmask', Validate::IPv4_NETMASK_OR_EMPTY, \Nethgui\Controller\Table\Modify::FIELD), array('VPNRemoteNetwork', Validate::IPv4_OR_EMPTY, \Nethgui\Controller\Table\Modify::FIELD), array('User', $this->createValidator()->orValidator($this->createValidator(Validate::USERNAME), $this->createValidator(Validate::EMPTYSTRING)), \Nethgui\Controller\Table\Modify::FIELD), array('AccountType', $this->createValidator()->memberOf(array('user', 'vpn')), \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { $parameterSchema = array(array('hostname', Validate::HOSTNAME_FQDN, \Nethgui\Controller\Table\Modify::KEY), array('IpAddress', Validate::IPv4, \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { $parameterSchema = array(array('name', Validate::USERNAME, \Nethgui\Controller\Table\Modify::KEY), array('Address', Validate::CIDR_BLOCK, \Nethgui\Controller\Table\Modify::FIELD), array('Description', Validate::ANYTHING, \Nethgui\Controller\Table\Modify::FIELD)); $this->setSchema($parameterSchema); parent::initialize(); }
public function initialize() { $this->setSchema(array(array('name', Validate::USERNAME, Table::KEY), array('IpAddress', Validate::IPv4, Table::FIELD), array('Description', Validate::ANYTHING, Table::FIELD))); parent::initialize(); }