private static function autoTemplate($section, $suffix = '.html.twig')
    {
        $cls = get_called_class();
        $bundleName = str_replace('\\', '', preg_replace('/^([\w]+\\\\)*?(\w+\\\\\w+Bundle).*$/', '\2', $cls));
        $elementName = implode('', array_slice(explode('\\', $cls), -1));
        $elementSnakeCase = strtolower(preg_replace('/([^A-Z])([A-Z])/', '\\1_\\2', $elementName));
        return "{$bundleName}:{$section}:{$elementSnakeCase}{$suffix}";
    }
private static function autoTemplate($section, $suffix = '.html.twig')
    {
        $cls = get_called_class();
        $bundleName = str_replace('\\', '', preg_replace('/^([\w]+\\\\)*?(\w+\\\\\w+Bundle).*$/', '\2', $cls));
        $elementName = implode('', array_slice(explode('\\', $cls), -1));
        $elementSnakeCase = strtolower(preg_replace('/([^A-Z])([A-Z])/', '\\1_\\2', $elementName));
        return "{$bundleName}:{$section}:{$elementSnakeCase}{$suffix}";
    }
private static function autoTemplate ( $ section , $ suffix = '.html.twig' ) { $ cls = get_called_class ( ) ; $ bundleName = str_replace ( '\\' , '' , preg_replace ( '/^([\w]+\\\\)*?(\w+\\\\\w+Bundle).*$/' , '\2' , $ cls ) ) ; $ elementName = implode ( '' , array_slice ( explode ( '\\' , $ cls ) , - 1 ) ) ; $ elementSnakeCase = strtolower ( preg_replace ( '/([^A-Z])([A-Z])/' , '\\1_\\2' , $ elementName ) ) ; return "{$bundleName}:{$section}:{$elementSnakeCase}{$suffix}" ; }
Auto-calculation of template reference from class name.
Bare-bones reimplementation of deprecated upstream method.

@param string $section 'Element' or 'ElementAdmin'
@param string $suffix '.html.twig' (default) or '.json.twig'
@return string twig-style template resource reference
Auto - calculation of template reference from class name . Bare - bones reimplementation of deprecated upstream method .