diff --git a/src/Plugin/Block/TYPProfileShareBlock.php b/src/Plugin/Block/TYPProfileShareBlock.php --- a/src/Plugin/Block/TYPProfileShareBlock.php +++ b/src/Plugin/Block/TYPProfileShareBlock.php @@ -1,86 +1,86 @@ getRequestUri(); $language = \Drupal::languageManager()->getCurrentLanguage()->getId(); $bid = end(explode("/",$url)); $this->data = \Drupal::service("typ.search")->getProfile($bid ,AUTO); $this->result = \Drupal::service('typ.unvservice')->loadListing($this->data['customerid'],NULL); $type = $this->result['address'][$this->data['headingcode']][$this->data['addressid']]['customertype']; switch ($type){ case "FL": $email = 'mailto:email@address.com?subject='.format_string($this->data['humanname']).'&body=Link:'.format_string($fullurl).format_string($this->data['proddesc']); $facebook = 'https://www.facebook.com/sharer/sharer.php?u='.$fullurl; $twitter = $fullurl; $gplus = 'https://plus.google.com/share?url='.$fullurl; break; default: $email = 'mailto:email@address.com?subject='.format_string($this->data['humanname']).'&body=Link:'.format_string($fullurl).format_string($this->data['proddesc']); $facebook = 'https://www.facebook.com/sharer/sharer.php?u='.$fullurl; $twitter = $fullurl; $gplus = 'https://plus.google.com/share?url='.$fullurl; } $base_url_images = '/themes/bootstrap/typ/images/icon-service-profilepage/'.$language; $build = array(); $build[] = array( '#markup' => format_string('
-
+
-
+
-
+
-
+
-
+
-
+
'), ); $build['#attached']['library'] = array( 'typ_profile/profile_share' ); return $build; } } ?> \ No newline at end of file