private function createSubjectFromPage(PageInterface $page)
    {
        try {
            $url = $this->urlGenerator->generate($page->getRoute(), [], UrlGeneratorInterface::ABSOLUTE_URL);

            $subject = new Subject();
            $subject->title = $page->getSeo()->getTitle();
            $subject->url   = $url;

            return $subject;
        } catch (ExceptionInterface $e) {
        }

        return null;
    }
private function createSubjectFromPage(PageInterface $page)
    {
        try {
            $url = $this->urlGenerator->generate($page->getRoute(), [], UrlGeneratorInterface::ABSOLUTE_URL);

            $subject = new Subject();
            $subject->title = $page->getSeo()->getTitle();
            $subject->url   = $url;

            return $subject;
        } catch (ExceptionInterface $e) {
        }

        return null;
    }
private function createSubjectFromPage ( PageInterface $ page ) { try { $ url = $ this -> urlGenerator -> generate ( $ page -> getRoute ( ) , [ ] , UrlGeneratorInterface :: ABSOLUTE_URL ) ; $ subject = new Subject ( ) ; $ subject -> title = $ page -> getSeo ( ) -> getTitle ( ) ; $ subject -> url = $ url ; return $ subject ; } catch ( ExceptionInterface $ e ) { } return null ; }
Creates the social share subject from the given page.

@param PageInterface $page
@return Subject|null
Creates the social share subject from the given page .