Example #1
0
 protected function setLinkFromParameter(Line &$line, $link)
 {
     if (filter_var($link, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)) {
         $line->setLink($link);
     } else {
         $title = \Title::newFromText($link);
         $line->setLink($title->getFullURL());
     }
 }