Exemplo n.º 1
0
 public function actionNotif()
 {
     echo "Push a notication <br/>";
     //push an activity Stream Notification
     /* **********************************
        Activity Stream and Notifications
        */
     //$type,$perimetre,$verb,$label,$id
     $asParam = array("type" => ActStr::TEST, "codeInsee" => "97400", "verb" => "add", "actorType" => "persons", "objectType" => "test", "label" => "Testing Notification Push", "id" => Yii::app()->session['userId']);
     $action = ActStr::buildEntry($asParam);
     //LOGGING WHO TO NOTIFY
     $action["notify"] = ActivityStream::addNotification(array("persons" => array(Yii::app()->session['userId']), "label" => "Something Changed", "icon" => ActStr::ICON_QUESTION, "url" => 'javascript:alert(  "testing notifications"  );'));
     ActivityStream::addEntry($action);
 }
Exemplo n.º 2
0
 public static function viewPage($url)
 {
     $asParam = array("type" => ActStr::VIEW_PAGE, "verb" => ActStr::VERB_VIEW, "actorType" => Person::COLLECTION, "objectType" => ActStr::TYPE_URL, "id" => $url, "ip" => $_SERVER['REMOTE_ADDR']);
     $action = self::buildEntry($asParam);
     ActivityStream::addEntry($action);
 }