public function isActive(TemplateDefinition $tplDefinition)
    {
        $tplVar = '';

        switch ($tplDefinition->getType()) {
            case TemplateDefinition::FRONT_OFFICE:
                $tplVar = 'active-front-template';
                break;
            case TemplateDefinition::BACK_OFFICE:
                $tplVar = 'active-admin-template';
                break;
            case TemplateDefinition::PDF:
                $tplVar = 'active-pdf-template';
                break;
            case TemplateDefinition::EMAIL:
                $tplVar = 'active-mail-template';
                break;
        }

        return $tplDefinition->getName() == ConfigQuery::read($tplVar, 'default');
    }
public function isActive(TemplateDefinition $tplDefinition)
    {
        $tplVar = '';

        switch ($tplDefinition->getType()) {
            case TemplateDefinition::FRONT_OFFICE:
                $tplVar = 'active-front-template';
                break;
            case TemplateDefinition::BACK_OFFICE:
                $tplVar = 'active-admin-template';
                break;
            case TemplateDefinition::PDF:
                $tplVar = 'active-pdf-template';
                break;
            case TemplateDefinition::EMAIL:
                $tplVar = 'active-mail-template';
                break;
        }

        return $tplDefinition->getName() == ConfigQuery::read($tplVar, 'default');
    }
public function isActive ( TemplateDefinition $ tplDefinition ) { $ tplVar = '' ; switch ( $ tplDefinition -> getType ( ) ) { case TemplateDefinition :: FRONT_OFFICE : $ tplVar = 'active-front-template' ; break ; case TemplateDefinition :: BACK_OFFICE : $ tplVar = 'active-admin-template' ; break ; case TemplateDefinition :: PDF : $ tplVar = 'active-pdf-template' ; break ; case TemplateDefinition :: EMAIL : $ tplVar = 'active-mail-template' ; break ; } return $ tplDefinition -> getName ( ) == ConfigQuery :: read ( $ tplVar , 'default' ) ; }
Check if a template definition is the current active template

@param  TemplateDefinition $tplDefinition
@return bool               true is the given template is the active template
Check if a template definition is the current active template