Page MenuHomePhabricator

No OneTemporary

diff --git a/src/Service/TYPProfileService.php b/src/Service/TYPProfileService.php
new file mode 100644
--- /dev/null
+++ b/src/Service/TYPProfileService.php
@@ -0,0 +1,23 @@
+<?php
+namespace Drupal\typ_profile\Service;
+
+use Drupal\typ_legacy\Service\TYP;
+use Drupal\typ_legacy\Service\TYPMongoDB;
+/**
+* Promotion Service
+*/
+class TYPProfileService
+{
+ public static function getCollection($collection = 'yp_promotion'){
+ return TYPMongoDB::getCollection($collection);
+ }
+
+ public static function _getpromotion($bid = NULL){
+ $data = self::getCollection('yp_promotion')->find(array('businessid'=>$bid));
+ if(count($data) == 1){
+ return $data;
+ }else{
+ break;
+ }
+ }
+}
\ No newline at end of file
diff --git a/typ_profile.services.yml b/typ_profile.services.yml
new file mode 100644
--- /dev/null
+++ b/typ_profile.services.yml
@@ -0,0 +1,3 @@
+services:
+ typ.profile:
+ class: Drupal\typ_profile\Service\TYPProfileService
\ No newline at end of file

File Metadata

Mime Type
text/x-diff
Expires
Tue, Dec 24, 6:25 AM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
193609

Event Timeline