Ejemplo n.º 1
0
 public function sendNotificationAction($message, $socialNetwork, $onlyAdmins = false)
 {
     $socialNetwork = SocialNetwork::parse($socialNetwork);
     try {
         $resultIds = $this->socialManager->sendNotification($message, $socialNetwork, $onlyAdmins);
     } catch (\Exception $ex) {
         return new ModelAndView("Index/error", array('exception' => $ex));
     }
     return new ModelAndView("Index/sendNotification", array('ids' => implode(",", $resultIds)));
 }
Ejemplo n.º 2
0
<?php

/*
 * MetaPlayer 1.0
 *
 * Licensed under the GPL terms
 * To use it on other terms please contact us
 *
 * Copyright(c) 2010-2011 Val Dubrava [ valery.dubrava@gmail.com ]
 *
 */
namespace MetaPlayer\Model;

use Oak\Common\Enum;
class SocialNetwork extends Enum
{
    /**
     * @var self
     */
    public static $VK = "vk";
    /**
     * @var self
     */
    public static $MY = "my";
}
SocialNetwork::init();
Ejemplo n.º 3
0
 /**
  * Get current social network.
  * @return SocialNetwork
  */
 public function getSocialNetwork()
 {
     return SocialNetwork::parse($this->httpSession->getAttribute(self::SOCIAL_NETWORK));
 }