src/Forms/GridField/GridFieldConfig.php
public function getComponentsByType($type)
    {
        $components = new ArrayList();
        foreach ($this->components as $component) {
            if ($component instanceof $type) {
                $components->push($component);
            }
        }
        return $components;
    }
public function getComponentsByType($type)
    {
        $components = new ArrayList();
        foreach ($this->components as $component) {
            if ($component instanceof $type) {
                $components->push($component);
            }
        }
        return $components;
    }
public function getComponentsByType ( $ type ) { $ components = new ArrayList ( ) ; foreach ( $ this -> components as $ component ) { if ( $ component instanceof $ type ) { $ components -> push ( $ component ) ; } } return $ components ; }
Returns all components extending a certain class, or implementing a certain interface.

@param string $type Class name or interface
@return ArrayList Of GridFieldComponent
Returns all components extending a certain class or implementing a certain interface .