public function entityAlbumsCount(OW_Event $e) { $params = $e->getParams(); $data = $e->getData(); if (empty($params['entityId'])) { return false; } $entityType = !empty($params['entityType']) ? $params['entityType'] : 'user'; $data["count"] = $this->albumService->countEntityAlbums($params['entityId'], $entityType); $e->setData($data); return $data; }