protected function setPreview($preview)
    {
        if (!($preview instanceof TemplateInterface) && !is_string($preview) && ($preview !== null)) {
            throw new \RuntimeException('Invalid preview preview', 1481368492);
        }
        $this->preview = $preview;
    }
protected function setPreview($preview)
    {
        if (!($preview instanceof TemplateInterface) && !is_string($preview) && ($preview !== null)) {
            throw new \RuntimeException('Invalid preview preview', 1481368492);
        }
        $this->preview = $preview;
    }
protected function setPreview ( $ preview ) { if ( ! ( $ preview instanceof TemplateInterface ) && ! is_string ( $ preview ) && ( $ preview !== null ) ) { throw new \ RuntimeException ( 'Invalid preview preview' , 1481368492 ) ; } $ this -> preview = $ preview ; }
Set a preview template

@param TemplateInterface|string|null $preview Preview template
Set a preview template