Neos\FluidAdaptor\Service\AbstractGenerator::getTagNameForClass PHP 메소드

getTagNameForClass() 보호된 메소드

Example: For the View Helper Neos\FluidAdaptor\ViewHelpers\Form\SelectViewHelper, and the namespace prefix Neos\FluidAdaptor\ViewHelpers\, this method returns "form.select".
protected getTagNameForClass ( string $className, string $namespace ) : string
$className string Class name
$namespace string Base namespace to use
리턴 string Tag name
    protected function getTagNameForClass($className, $namespace)
    {
        $strippedClassName = substr($className, strlen($namespace));
        $classNameParts = explode('\\', $strippedClassName);
        if (count($classNameParts) == 1) {
            $tagName = lcfirst(substr($classNameParts[0], 0, -10));
            // strip the "ViewHelper" ending
        } else {
            $tagName = lcfirst($classNameParts[0]) . '.' . lcfirst(substr($classNameParts[1], 0, -10));
        }
        return $tagName;
    }