original_string: public function setAutoSubmit($submitUrl, $targetId, $selective = false)
      {
          // Filter out elements passed by type
          $args = \MUtil_Ra::args(func_get_args(),
              array(
                  'submitUrl' => array('MUtil_Html_UrlArrayAttribute', 'is_array', 'is_string'),
                  'targetId'  => array('MUtil_Html_ElementInterface', 'is_string'),
                  ), null, \MUtil_Ra::STRICT);
  
          if (isset($args['targetId'])) {
              if ($args['targetId'] instanceof \MUtil_Html_ElementInterface) {
                  if (isset($args['targetId']->id)) {
                      $args['targetId'] = '#' . $args['targetId']->id;
                  } elseif (isset($args['targetId']->class)) {
                      $args['targetId'] = '.' . $args['targetId']->class;
                  } else {
                      $args['targetId'] = $args['targetId']->getTagName();
                  }
              } else {
                  $args['targetId'] = '#' . $args['targetId'];
              }
          }
          if ($selective) {
              $args['selective'] = true;
          }
  
          $this->_autosubmit = $args;
          $this->_enableAutoSubmitElement($this);
          $this->activateJQuery();
      }
code: public function setAutoSubmit($submitUrl, $targetId, $selective = false)
      {
          // Filter out elements passed by type
          $args = \MUtil_Ra::args(func_get_args(),
              array(
                  'submitUrl' => array('MUtil_Html_UrlArrayAttribute', 'is_array', 'is_string'),
                  'targetId'  => array('MUtil_Html_ElementInterface', 'is_string'),
                  ), null, \MUtil_Ra::STRICT);
  
          if (isset($args['targetId'])) {
              if ($args['targetId'] instanceof \MUtil_Html_ElementInterface) {
                  if (isset($args['targetId']->id)) {
                      $args['targetId'] = '#' . $args['targetId']->id;
                  } elseif (isset($args['targetId']->class)) {
                      $args['targetId'] = '.' . $args['targetId']->class;
                  } else {
                      $args['targetId'] = $args['targetId']->getTagName();
                  }
              } else {
                  $args['targetId'] = '#' . $args['targetId'];
              }
          }
          if ($selective) {
              $args['selective'] = true;
          }
  
          $this->_autosubmit = $args;
          $this->_enableAutoSubmitElement($this);
          $this->activateJQuery();
      }
code_tokens: public function setAutoSubmit ( $ submitUrl , $ targetId , $ selective = false ) { // Filter out elements passed by type
   $ args = \ MUtil_Ra :: args ( func_get_args ( ) , array ( 'submitUrl' => array ( 'MUtil_Html_UrlArrayAttribute' , 'is_array' , 'is_string' ) , 'targetId' => array ( 'MUtil_Html_ElementInterface' , 'is_string' ) , ) , null , \ MUtil_Ra :: STRICT ) ; if ( isset ( $ args [ 'targetId' ] ) ) { if ( $ args [ 'targetId' ] instanceof \ MUtil_Html_ElementInterface ) { if ( isset ( $ args [ 'targetId' ] -> id ) ) { $ args [ 'targetId' ] = '#' . $ args [ 'targetId' ] -> id ; } elseif ( isset ( $ args [ 'targetId' ] -> class ) ) { $ args [ 'targetId' ] = '.' . $ args [ 'targetId' ] -> class ; } else { $ args [ 'targetId' ] = $ args [ 'targetId' ] -> getTagName ( ) ; } } else { $ args [ 'targetId' ] = '#' . $ args [ 'targetId' ] ; } } if ( $ selective ) { $ args [ 'selective' ] = true ; } $ this -> _autosubmit = $ args ; $ this -> _enableAutoSubmitElement ( $ this ) ; $ this -> activateJQuery ( ) ; }
docstring: Change the form into an autosubmit form
  
  @param mixed $submitUrl Url as \MUtil_Html_UrlArrayAttribute, array or string
  @param mixed $targetId Id of html element whose content is replaced by the submit result: \MUtil_Html_ElementInterface or string
  @param boolean $selective When true autosubmit is applied only to elements with the CSS class autosubmit
docstring_tokens: Change the form into an autosubmit form