public function getFilteredDefinitions($type) {
    $all = $this->getDefinitions();

    return array_filter($all, function ($definition) use ($type) {
      return $definition['type'] === $type;
    });
  }
public function getFilteredDefinitions($type) {
    $all = $this->getDefinitions();

    return array_filter($all, function ($definition) use ($type) {
      return $definition['type'] === $type;
    });
  }
public function getFilteredDefinitions ( $ type ) { $ all = $ this -> getDefinitions ( ) ; return array_filter ( $ all , function ( $ definition ) use ( $ type ) { return $ definition [ 'type' ] === $ type ; } ) ; }
Filters plugin definitions by a type.

@param string $type
Type to filter by.

@return array
A list of filtered plugin definitions.
Filters plugin definitions by a type .