protected function getHookType($name)
    {
        $type = TemplateDefinition::FRONT_OFFICE;

        if (null !== $name && \is_string($name)) {
            $name = preg_replace("[^a-z]", "", strtolower(trim($name)));
            if (\in_array($name, array('bo', 'back', 'backoffice'))) {
                $type = TemplateDefinition::BACK_OFFICE;
            } elseif (\in_array($name, array('email'))) {
                $type = TemplateDefinition::EMAIL;
            } elseif (\in_array($name, array('pdf'))) {
                $type = TemplateDefinition::PDF;
            }
        }

        return $type;
    }
protected function getHookType($name)
    {
        $type = TemplateDefinition::FRONT_OFFICE;

        if (null !== $name && \is_string($name)) {
            $name = preg_replace("[^a-z]", "", strtolower(trim($name)));
            if (\in_array($name, array('bo', 'back', 'backoffice'))) {
                $type = TemplateDefinition::BACK_OFFICE;
            } elseif (\in_array($name, array('email'))) {
                $type = TemplateDefinition::EMAIL;
            } elseif (\in_array($name, array('pdf'))) {
                $type = TemplateDefinition::PDF;
            }
        }

        return $type;
    }
protected function getHookType ( $ name ) { $ type = TemplateDefinition :: FRONT_OFFICE ; if ( null !== $ name && \ is_string ( $ name ) ) { $ name = preg_replace ( "[^a-z]" , "" , strtolower ( trim ( $ name ) ) ) ; if ( \ in_array ( $ name , array ( 'bo' , 'back' , 'backoffice' ) ) ) { $ type = TemplateDefinition :: BACK_OFFICE ; } elseif ( \ in_array ( $ name , array ( 'email' ) ) ) { $ type = TemplateDefinition :: EMAIL ; } elseif ( \ in_array ( $ name , array ( 'pdf' ) ) ) { $ type = TemplateDefinition :: PDF ; } } return $ type ; }
get the hook type according to the type attribute of the hook tag

@param string $name

@return int the hook type
get the hook type according to the type attribute of the hook tag