protected function stripLinkBase($link)
    {
        // Trim baseURL
        $link = preg_replace('/^' . preg_quote(Director::baseURL(), '/') .'/', '', $link);

        // Trim link_base
        if ($linkBase = Config::inst()->get('DocumentationViewer', 'link_base')) {
            $link = preg_replace('/^' . preg_quote($linkBase, '/') .'\/?/', '', $link);
        }

        return $link;
    }
protected function stripLinkBase($link)
    {
        // Trim baseURL
        $link = preg_replace('/^' . preg_quote(Director::baseURL(), '/') .'/', '', $link);

        // Trim link_base
        if ($linkBase = Config::inst()->get('DocumentationViewer', 'link_base')) {
            $link = preg_replace('/^' . preg_quote($linkBase, '/') .'\/?/', '', $link);
        }

        return $link;
    }
protected function stripLinkBase ( $ link ) { // Trim baseURL $ link = preg_replace ( '/^' . preg_quote ( Director :: baseURL ( ) , '/' ) . '/' , '' , $ link ) ; // Trim link_base if ( $ linkBase = Config :: inst ( ) -> get ( 'DocumentationViewer' , 'link_base' ) ) { $ link = preg_replace ( '/^' . preg_quote ( $ linkBase , '/' ) . '\/?/' , '' , $ link ) ; } return $ link ; }
Remove the link_base from the start of a link

@param  string $link
@return string
Remove the link_base from the start of a link