コード例 #1
0
 /**
  * @param $url
  *
  * @return Trackable
  */
 protected function getTrackableEntity($url)
 {
     $redirect = new Redirect();
     $redirect->setUrl($url);
     $redirect->setRedirectId();
     $trackable = new Trackable();
     $trackable->setChannel('email')->setChannelId(1)->setRedirect($redirect)->setHits(rand(1, 10))->setUniqueHits(rand(1, 10));
     return $trackable;
 }
コード例 #2
0
ファイル: TrackableModel.php プロジェクト: dongilbert/mautic
 /**
  * Create a Trackable entity.
  *
  * @param $url
  * @param $channel
  * @param $channelId
  *
  * @return Trackable
  */
 protected function createTrackableEntity($url, $channel, $channelId)
 {
     $redirect = $this->getRedirectModel()->createRedirectEntity($url);
     $trackable = new Trackable();
     $trackable->setChannel($channel)->setChannelId($channelId)->setRedirect($redirect);
     return $trackable;
 }