Example #1
0
 public function getActionPermalink(OW_Event $event)
 {
     $params = $event->getParams();
     $actionId = empty($params['actionId']) ? null : $params['actionId'];
     if (empty($actionId) && !empty($params['entityType']) && !empty($params['entityId'])) {
         $action = $this->service->findAction($params['entityType'], $params['entityId']);
         if (empty($action)) {
             return null;
         }
         $actionId = $action->id;
     }
     if (empty($actionId)) {
         return null;
     }
     $url = $this->service->getActionPermalink($actionId);
     $event->setData($url);
     return $url;
 }