original_string: protected function _isDisabled(array $options)
      {
          if (!isset($options['disabled'])) {
              return false;
          }
          if (is_scalar($options['disabled'])) {
              return ($options['disabled'] === true || $options['disabled'] === 'disabled');
          }
          if (!isset($options['options'])) {
              return false;
          }
          if (is_array($options['options'])) {
              // Simple list options
              $first = $options['options'][array_keys($options['options'])[0]];
              if (is_scalar($first)) {
                  return array_diff($options['options'], $options['disabled']) === [];
              }
              // Complex option types
              if (is_array($first)) {
                  $disabled = array_filter($options['options'], function ($i) use ($options) {
                      return in_array($i['value'], $options['disabled']);
                  });
  
                  return count($disabled) > 0;
              }
          }
  
          return false;
      }
code: protected function _isDisabled(array $options)
      {
          if (!isset($options['disabled'])) {
              return false;
          }
          if (is_scalar($options['disabled'])) {
              return ($options['disabled'] === true || $options['disabled'] === 'disabled');
          }
          if (!isset($options['options'])) {
              return false;
          }
          if (is_array($options['options'])) {
              // Simple list options
              $first = $options['options'][array_keys($options['options'])[0]];
              if (is_scalar($first)) {
                  return array_diff($options['options'], $options['disabled']) === [];
              }
              // Complex option types
              if (is_array($first)) {
                  $disabled = array_filter($options['options'], function ($i) use ($options) {
                      return in_array($i['value'], $options['disabled']);
                  });
  
                  return count($disabled) > 0;
              }
          }
  
          return false;
      }
code_tokens: protected function _isDisabled ( array $ options ) { if ( ! isset ( $ options [ 'disabled' ] ) ) { return false ; } if ( is_scalar ( $ options [ 'disabled' ] ) ) { return ( $ options [ 'disabled' ] === true || $ options [ 'disabled' ] === 'disabled' ) ; } if ( ! isset ( $ options [ 'options' ] ) ) { return false ; } if ( is_array ( $ options [ 'options' ] ) ) { // Simple list options $ first = $ options [ 'options' ] [ array_keys ( $ options [ 'options' ] ) [ 0 ] ] ; if ( is_scalar ( $ first ) ) { return array_diff ( $ options [ 'options' ] , $ options [ 'disabled' ] ) === [ ] ; } // Complex option types if ( is_array ( $ first ) ) { $ disabled = array_filter ( $ options [ 'options' ] , function ( $ i ) use ( $ options ) { return in_array ( $ i [ 'value' ] , $ options [ 'disabled' ] ) ; } ) ; return count ( $ disabled ) > 0 ; } } return false ; }
docstring: Determine if a field is disabled.
  
  @param array $options The option set.
  @return bool Whether or not the field is disabled.
docstring_tokens: Determine if a field is disabled .