src/Sulu/Bundle/PageBundle/Command/ValidateWebspacesCommand.php
private function validateTemplate($type, $template)
    {
        $status = '<info>ok</info>';

        try {
            $this->validateTwigTemplate($template);
        } catch (\Exception $e) {
            $status = sprintf('<error>failed: %s</error>', $e->getMessage());
            $this->errors[] = $e->getMessage();
        }

        $this->output->writeln(
            sprintf(
                '    %s: %s -> %s',
                $type,
                $template,
                $status
            )
        );
    }
private function validateTemplate($type, $template)
    {
        $status = '<info>ok</info>';

        try {
            $this->validateTwigTemplate($template);
        } catch (\Exception $e) {
            $status = sprintf('<error>failed: %s</error>', $e->getMessage());
            $this->errors[] = $e->getMessage();
        }

        $this->output->writeln(
            sprintf(
                '    %s: %s -> %s',
                $type,
                $template,
                $status
            )
        );
    }
private function validateTemplate ( $ type , $ template ) { $ status = '<info>ok</info>' ; try { $ this -> validateTwigTemplate ( $ template ) ; } catch ( \ Exception $ e ) { $ status = sprintf ( '<error>failed: %s</error>' , $ e -> getMessage ( ) ) ; $ this -> errors [ ] = $ e -> getMessage ( ) ; } $ this -> output -> writeln ( sprintf ( '    %s: %s -> %s' , $ type , $ template , $ status ) ) ; }
Validate template.

@param string $type
@param string $template
Validate template .