src/Charcoal/Admin/AdminTemplate.php
public function templateName()
    {
        $key = substr(strrchr('\\'.get_class($this), '\\'), 1);

        if (!isset(static::$templateNameCache[$key])) {
            $value = $key;

            if (!ctype_lower($value)) {
                $value = preg_replace('/\s+/u', '', $value);
                $value = mb_strtolower(preg_replace('/(.)(?=[A-Z])/u', '$1-', $value), 'UTF-8');
            }

            $value = str_replace(
                [ 'abstract', 'trait', 'interface', 'template', '\\' ],
                '',
                $value
            );

            static::$templateNameCache[$key] = trim($value, '-');
        }

        return static::$templateNameCache[$key];
    }
public function templateName()
    {
        $key = substr(strrchr('\\'.get_class($this), '\\'), 1);

        if (!isset(static::$templateNameCache[$key])) {
            $value = $key;

            if (!ctype_lower($value)) {
                $value = preg_replace('/\s+/u', '', $value);
                $value = mb_strtolower(preg_replace('/(.)(?=[A-Z])/u', '$1-', $value), 'UTF-8');
            }

            $value = str_replace(
                [ 'abstract', 'trait', 'interface', 'template', '\\' ],
                '',
                $value
            );

            static::$templateNameCache[$key] = trim($value, '-');
        }

        return static::$templateNameCache[$key];
    }
public function templateName ( ) { $ key = substr ( strrchr ( '\\' . get_class ( $ this ) , '\\' ) , 1 ) ; if ( ! isset ( static :: $ templateNameCache [ $ key ] ) ) { $ value = $ key ; if ( ! ctype_lower ( $ value ) ) { $ value = preg_replace ( '/\s+/u' , '' , $ value ) ; $ value = mb_strtolower ( preg_replace ( '/(.)(?=[A-Z])/u' , '$1-' , $ value ) , 'UTF-8' ) ; } $ value = str_replace ( [ 'abstract' , 'trait' , 'interface' , 'template' , '\\' ] , '' , $ value ) ; static :: $ templateNameCache [ $ key ] = trim ( $ value , '-' ) ; } return static :: $ templateNameCache [ $ key ] ; }
Retrieve the template's identifier.

@return string
Retrieve the template s identifier .