original_string: protected function makeModelListFilterDataForAttributeData(ModelAttributeData $attribute, ModelInformationInterface $info)
      {
          $strategy = false;
          $options  = [];
  
          if ($attribute->cast === AttributeCast::BOOLEAN) {
  
              $strategy = FilterStrategy::BOOLEAN;
  
          } elseif ($attribute->type === 'enum') {
  
              $strategy = FilterStrategy::DROPDOWN;
              $options['values'] = $attribute->values;
  
          } elseif ($attribute->cast === AttributeCast::STRING) {
  
              $strategy = FilterStrategy::STRING;
  
          } elseif ($attribute->cast === AttributeCast::DATE) {
  
              $strategy = FilterStrategy::DATE;
          }
  
          if ( ! $strategy) {
              return false;
          }
  
          return new ModelListFilterData([
              'source'   => $attribute->name,
              'label'    => str_replace('_', ' ', snake_case($attribute->name)),
              'target'   => $attribute->name,
              'strategy' => $strategy,
              'options'  => $options,
          ]);
      }
code: protected function makeModelListFilterDataForAttributeData(ModelAttributeData $attribute, ModelInformationInterface $info)
      {
          $strategy = false;
          $options  = [];
  
          if ($attribute->cast === AttributeCast::BOOLEAN) {
  
              $strategy = FilterStrategy::BOOLEAN;
  
          } elseif ($attribute->type === 'enum') {
  
              $strategy = FilterStrategy::DROPDOWN;
              $options['values'] = $attribute->values;
  
          } elseif ($attribute->cast === AttributeCast::STRING) {
  
              $strategy = FilterStrategy::STRING;
  
          } elseif ($attribute->cast === AttributeCast::DATE) {
  
              $strategy = FilterStrategy::DATE;
          }
  
          if ( ! $strategy) {
              return false;
          }
  
          return new ModelListFilterData([
              'source'   => $attribute->name,
              'label'    => str_replace('_', ' ', snake_case($attribute->name)),
              'target'   => $attribute->name,
              'strategy' => $strategy,
              'options'  => $options,
          ]);
      }
code_tokens: protected function makeModelListFilterDataForAttributeData ( ModelAttributeData $ attribute , ModelInformationInterface $ info ) { $ strategy = false ; $ options = [ ] ; if ( $ attribute -> cast === AttributeCast :: BOOLEAN ) { $ strategy = FilterStrategy :: BOOLEAN ; } elseif ( $ attribute -> type === 'enum' ) { $ strategy = FilterStrategy :: DROPDOWN ; $ options [ 'values' ] = $ attribute -> values ; } elseif ( $ attribute -> cast === AttributeCast :: STRING ) { $ strategy = FilterStrategy :: STRING ; } elseif ( $ attribute -> cast === AttributeCast :: DATE ) { $ strategy = FilterStrategy :: DATE ; } if ( ! $ strategy ) { return false ; } return new ModelListFilterData ( [ 'source' => $ attribute -> name , 'label' => str_replace ( '_' , ' ' , snake_case ( $ attribute -> name ) ) , 'target' => $ attribute -> name , 'strategy' => $ strategy , 'options' => $ options , ] ) ; }
docstring: Makes list filter data given attribute data.
  
  @param ModelAttributeData                         $attribute
  @param ModelInformationInterface|ModelInformation $info
  @return ModelListFilterData|false
docstring_tokens: Makes list filter data given attribute data .