original_string: public function addDeReactivateAction($checkField, $deactivateOn = 1, $reactivateOn = 1, array $otherDeact = array(), array $otherReact = array())
      {
          $pages = array();
  
          if (null !== $deactivateOn) {
              if (isset($otherDeact['privilege'])) {
                  $privilege = $otherDeact['privilege'];
              } else {
                  $privilege = $this->get('privilege') . '.deactivate';
              }
  
              $deactivate = $this->addAction($this->_('Deactivate'), $privilege, 'deactivate', $otherDeact);
              $deactivate->setModelParameters(1)
                      ->addParameterFilter($checkField, $deactivateOn);
              $pages['deactivate'] = $deactivate;
          }
  
          if (null !== $reactivateOn) {
              if (isset($otherReact['privilege'])) {
                  $privilege = $otherReact['privilege'];
              } else {
                  $privilege = $this->get('privilege') . '.reactivate';
              }
  
              $reactivate = $this->addAction($this->_('Reactivate'), $privilege, 'reactivate', $otherReact);
              $reactivate->setModelParameters(1)
                      ->addParameterFilter($checkField, $reactivateOn);
              $pages['reactivate'] = $reactivate;
          }
  
          return $pages;
      }
code: public function addDeReactivateAction($checkField, $deactivateOn = 1, $reactivateOn = 1, array $otherDeact = array(), array $otherReact = array())
      {
          $pages = array();
  
          if (null !== $deactivateOn) {
              if (isset($otherDeact['privilege'])) {
                  $privilege = $otherDeact['privilege'];
              } else {
                  $privilege = $this->get('privilege') . '.deactivate';
              }
  
              $deactivate = $this->addAction($this->_('Deactivate'), $privilege, 'deactivate', $otherDeact);
              $deactivate->setModelParameters(1)
                      ->addParameterFilter($checkField, $deactivateOn);
              $pages['deactivate'] = $deactivate;
          }
  
          if (null !== $reactivateOn) {
              if (isset($otherReact['privilege'])) {
                  $privilege = $otherReact['privilege'];
              } else {
                  $privilege = $this->get('privilege') . '.reactivate';
              }
  
              $reactivate = $this->addAction($this->_('Reactivate'), $privilege, 'reactivate', $otherReact);
              $reactivate->setModelParameters(1)
                      ->addParameterFilter($checkField, $reactivateOn);
              $pages['reactivate'] = $reactivate;
          }
  
          return $pages;
      }
code_tokens: public function addDeReactivateAction ( $ checkField , $ deactivateOn = 1 , $ reactivateOn = 1 , array $ otherDeact = array ( ) , array $ otherReact = array ( ) ) { $ pages = array ( ) ; if ( null !== $ deactivateOn ) { if ( isset ( $ otherDeact [ 'privilege' ] ) ) { $ privilege = $ otherDeact [ 'privilege' ] ; } else { $ privilege = $ this -> get ( 'privilege' ) . '.deactivate' ; } $ deactivate = $ this -> addAction ( $ this -> _ ( 'Deactivate' ) , $ privilege , 'deactivate' , $ otherDeact ) ; $ deactivate -> setModelParameters ( 1 ) -> addParameterFilter ( $ checkField , $ deactivateOn ) ; $ pages [ 'deactivate' ] = $ deactivate ; } if ( null !== $ reactivateOn ) { if ( isset ( $ otherReact [ 'privilege' ] ) ) { $ privilege = $ otherReact [ 'privilege' ] ; } else { $ privilege = $ this -> get ( 'privilege' ) . '.reactivate' ; } $ reactivate = $ this -> addAction ( $ this -> _ ( 'Reactivate' ) , $ privilege , 'reactivate' , $ otherReact ) ; $ reactivate -> setModelParameters ( 1 ) -> addParameterFilter ( $ checkField , $ reactivateOn ) ; $ pages [ 'reactivate' ] = $ reactivate ; } return $ pages ; }
docstring: Add a standard deactivate action and optional reactivate action to the current menu item
  
  @param string $checkField   The name of the field to filter on for deactivation
  @param string $deactivateOn The value to check against for deactivation, no menu item when null
  @param string $reactivateOn The value to check against for reactivation, no menu item when null
  @param array  $otherDeact    Array of extra options for deactivate item, e.g. 'visible', 'allowed', 'class',
  'icon', 'privilege', 'target', 'type', 'button_only'.
  @param array  $otherReact    Array of extra options for reactivate item, e.g. 'visible', 'allowed', 'class',
  'icon', 'privilege', 'target', 'type', 'button_only'.
  @return \Gems_Menu_SubmenuItem[]
docstring_tokens: Add a standard deactivate action and optional reactivate action to the current menu item