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

    return array_filter($all, function ($definition) use ($type) {
      return $definition['type'] === $type;
    });
  }