Contao\CoreBundle\DependencyInjection\Compiler\AddResourcesPathsPass::getResourcesPathFromClassName PHP Method

getResourcesPathFromClassName() private method

Returns the resources path from the class name.
private getResourcesPathFromClassName ( string $class ) : string | null
$class string
return string | null
    private function getResourcesPathFromClassName($class)
    {
        $reflection = new \ReflectionClass($class);
        if (is_dir($dir = dirname($reflection->getFileName()) . '/Resources/contao')) {
            return $dir;
        }
        return null;
    }