private function getResourcePathFromClassName($class)
    {
        $reflection = new \ReflectionClass($class);

        if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/contao')) {
            return $dir;
        }

        return null;
    }