protected function getContentOfType($path, $type) { $content = $this->getContent($path); if (null !== $content && $content->getType() === $type) { return $content; } return null; }