original_string: public function FloodControl() {
        // Check permission
        $this->Permission('Garden.Settings.Manage');
        
        // Display options
        $this->Title(T('Flood Control'));
        $this->AddSideMenu('vanilla/settings/floodcontrol');
        
        // Load up config options we'll be setting
        $Validation = new Gdn_Validation();
        $ConfigurationModel = new Gdn_ConfigurationModel($Validation);
        $ConfigurationModel->SetField(array(
           'Vanilla.Discussion.SpamCount',
           'Vanilla.Discussion.SpamTime',
           'Vanilla.Discussion.SpamLock',
           'Vanilla.Comment.SpamCount',
           'Vanilla.Comment.SpamTime',
           'Vanilla.Comment.SpamLock',
           'Vanilla.Comment.MaxLength',
           'Vanilla.Comment.MinLength'
        ));
        
        // Set the model on the form.
        $this->Form->SetModel($ConfigurationModel);
        
        // If seeing the form for the first time...
        if ($this->Form->AuthenticatedPostBack() === FALSE) {
           // Apply the config settings to the form.
           $this->Form->SetData($ConfigurationModel->Data);
        } else {
           // Define some validation rules for the fields being saved
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamCount', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamCount', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamTime', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamTime', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamLock', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamLock', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamCount', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamCount', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamTime', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamTime', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamLock', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamLock', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.MaxLength', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.MaxLength', 'Integer');
           
           if ($this->Form->Save() !== FALSE) {
              $this->InformMessage(T("Your changes have been saved."));
           }
        }
        
        // Render default view
        $this->Render();
     }
code: public function FloodControl() {
        // Check permission
        $this->Permission('Garden.Settings.Manage');
        
        // Display options
        $this->Title(T('Flood Control'));
        $this->AddSideMenu('vanilla/settings/floodcontrol');
        
        // Load up config options we'll be setting
        $Validation = new Gdn_Validation();
        $ConfigurationModel = new Gdn_ConfigurationModel($Validation);
        $ConfigurationModel->SetField(array(
           'Vanilla.Discussion.SpamCount',
           'Vanilla.Discussion.SpamTime',
           'Vanilla.Discussion.SpamLock',
           'Vanilla.Comment.SpamCount',
           'Vanilla.Comment.SpamTime',
           'Vanilla.Comment.SpamLock',
           'Vanilla.Comment.MaxLength',
           'Vanilla.Comment.MinLength'
        ));
        
        // Set the model on the form.
        $this->Form->SetModel($ConfigurationModel);
        
        // If seeing the form for the first time...
        if ($this->Form->AuthenticatedPostBack() === FALSE) {
           // Apply the config settings to the form.
           $this->Form->SetData($ConfigurationModel->Data);
        } else {
           // Define some validation rules for the fields being saved
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamCount', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamCount', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamTime', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamTime', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamLock', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Discussion.SpamLock', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamCount', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamCount', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamTime', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamTime', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamLock', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.SpamLock', 'Integer');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.MaxLength', 'Required');
           $ConfigurationModel->Validation->ApplyRule('Vanilla.Comment.MaxLength', 'Integer');
           
           if ($this->Form->Save() !== FALSE) {
              $this->InformMessage(T("Your changes have been saved."));
           }
        }
        
        // Render default view
        $this->Render();
     }
code_tokens: public function FloodControl ( ) { // Check permission $ this -> Permission ( 'Garden.Settings.Manage' ) ; // Display options $ this -> Title ( T ( 'Flood Control' ) ) ; $ this -> AddSideMenu ( 'vanilla/settings/floodcontrol' ) ; // Load up config options we'll be setting $ Validation = new Gdn_Validation ( ) ; $ ConfigurationModel = new Gdn_ConfigurationModel ( $ Validation ) ; $ ConfigurationModel -> SetField ( array ( 'Vanilla.Discussion.SpamCount' , 'Vanilla.Discussion.SpamTime' , 'Vanilla.Discussion.SpamLock' , 'Vanilla.Comment.SpamCount' , 'Vanilla.Comment.SpamTime' , 'Vanilla.Comment.SpamLock' , 'Vanilla.Comment.MaxLength' , 'Vanilla.Comment.MinLength' ) ) ; // Set the model on the form. $ this -> Form -> SetModel ( $ ConfigurationModel ) ; // If seeing the form for the first time... if ( $ this -> Form -> AuthenticatedPostBack ( ) === FALSE ) { // Apply the config settings to the form. $ this -> Form -> SetData ( $ ConfigurationModel -> Data ) ; } else { // Define some validation rules for the fields being saved $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Discussion.SpamCount' , 'Required' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Discussion.SpamCount' , 'Integer' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Discussion.SpamTime' , 'Required' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Discussion.SpamTime' , 'Integer' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Discussion.SpamLock' , 'Required' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Discussion.SpamLock' , 'Integer' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Comment.SpamCount' , 'Required' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Comment.SpamCount' , 'Integer' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Comment.SpamTime' , 'Required' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Comment.SpamTime' , 'Integer' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Comment.SpamLock' , 'Required' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Comment.SpamLock' , 'Integer' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Comment.MaxLength' , 'Required' ) ; $ ConfigurationModel -> Validation -> ApplyRule ( 'Vanilla.Comment.MaxLength' , 'Integer' ) ; if ( $ this -> Form -> Save ( ) !== FALSE ) { $ this -> InformMessage ( T ( "Your changes have been saved." ) ) ; } } // Render default view $ this -> Render ( ) ; }
docstring: Display flood control options.
  
  @since 2.0.0
  @access public
docstring_tokens: Display flood control options .