public function __invoke($isWebmaster, SocialMediaModel $socMod) { $str = ''; if ($isWebmaster) { $str .= " ·<a href='javascript:void(0);' class='unpubLink' "; $str .= "data-social_id='" . $socMod->getSocialId() . "' "; $str .= "data-blvdid='" . $socMod->getBlvdId() . "' "; $str .= "data-username='******'>"; $str .= "unpub</a>"; if ($socMod->getSource() == 'twitter') { $arr = array('action' => 'edituser', 'screenname' => $socMod->getUsername()); $str .= "·<a class='editTwitterLink' target='_blank' href='" . $this->view->url('twitter', $arr) . "'>edit twit</a>"; } } return $str; }
public function getOpenTableSocial(BlvdEntity $blvdEnt) { $social = new SocialMediaModel(); $social->setDateCreated(date("Y-m-d H:i:s"))->setBlvdId($blvdEnt->getId())->setLink($blvdEnt->getReservationUrl())->setMediaHeight(100)->setMediaWidth(100)->setText('Reserve table online')->setSource('opentable')->setSocialId(0)->setMediaUrl('/img/opentable100x100.jpg'); return $social; }