public function handleCompanyPageCreation(Location $location) { $this->channelWizard->setName($location->getName()); $pagesData = $this->channelWizard->get('pagesData'); $pageData = $pagesData[$location->getIdentifier()]; $companyLink = 'https://www.linkedin.com/company/' . $pageData['id']; $location->setUrl($companyLink); $page = new Page(); $page->setLocation($location); $page->setIdentifier($pageData['id']); $page->setDisplayName($pageData['name']); $page->setDescription($pageData['description']); $page->setLink($companyLink); $page->setWebsiteLink($pageData['websiteUrl']); // Remember the user object in the Wizard. $this->channelWizard->set($page->getIdentifier(), $page); $flashBagMsg = $this->channelWizard->get('flashBagMsg'); $flashBagMsg .= '<li>Page: <a href="' . $page->getLink() . '">' . $page->getDisplayName() . '</a></li>'; $this->channelWizard->set('flashBagMsg', $flashBagMsg); }