src/Extensions/PdfExportExtension.php
public function PdfLink()
    {
        if (!$this->owner->config()->get('pdf_export')) {
            return false;
        }

        $path = $this->getPdfFilename();

        if ((Versioned::get_stage() === Versioned::LIVE) && file_exists($path)) {
            return Director::baseURL() . preg_replace('#^/#', '', Director::makeRelative($path));
        }
        return $this->owner->Link('downloadpdf');
    }
public function PdfLink()
    {
        if (!$this->owner->config()->get('pdf_export')) {
            return false;
        }

        $path = $this->getPdfFilename();

        if ((Versioned::get_stage() === Versioned::LIVE) && file_exists($path)) {
            return Director::baseURL() . preg_replace('#^/#', '', Director::makeRelative($path));
        }
        return $this->owner->Link('downloadpdf');
    }
public function PdfLink ( ) { if ( ! $ this -> owner -> config ( ) -> get ( 'pdf_export' ) ) { return false ; } $ path = $ this -> getPdfFilename ( ) ; if ( ( Versioned :: get_stage ( ) === Versioned :: LIVE ) && file_exists ( $ path ) ) { return Director :: baseURL ( ) . preg_replace ( '#^/#' , '' , Director :: makeRelative ( $ path ) ) ; } return $ this -> owner -> Link ( 'downloadpdf' ) ; }
Build pdf link for template.
Build pdf link for template .