Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1082508
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
View Options
diff --git a/src/Plugin/Block/TYPProfileFacebook.php b/src/Plugin/Block/TYPProfileFacebook.php
--- a/src/Plugin/Block/TYPProfileFacebook.php
+++ b/src/Plugin/Block/TYPProfileFacebook.php
@@ -1,57 +1,57 @@
<?php
namespace Drupal\typ_profile\Plugin\Block;
/**
* @file
* Contains \Drupal\search\Plugin\Block\SearchBlock.
*/
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Url;
use Drupal\typ_legacy\Service\TYPLegacyLandingPageService;
use Drupal\typ_search\Service\TYPSearchService;
use Drupal\typ_legacy\Serivee;
/**
* Provides a 'Search form' block.
*
* @Block(
* id = "typ_profile_share_facebook",
* admin_label = @Translation("Profile facebook"),
* category = @Translation("TYP")
* )
*/
class TYPProfileFacebook extends BlockBase
{
protected $data;
protected $result;
public function build(){
$url = \Drupal::request()->getRequestUri();
$s = explode("/",$url);
$bid = end($s);
$this->data = \Drupal::service("typ.search")->getProfile($bid ,AUTO);
$this->result = \Drupal::service('typ.unvservice')->loadListing($this->data['customerid'],NULL);
$facebook = '';
- if($this->data['customertype'] == 'FL' || $this->data['customertype'] == '' || $this->result['accounting_status'] == '1'){
+ if($this->data['customertype'] == 'FL' || $this->data['customertype'] == '' || $this->result['accounting_status'] == '1' || $this->data['hide'] == '1' || $this->data['accounting_status'] == '1'){
$facebook = format_string('<div class="text-center"><div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/th_TH/sdk.js#xfbml=1&version=v2.4";
fjs.parentNode.insertBefore(js, fjs);
}(document, \'script\', \'facebook-jssdk\'));</script>
<div class="fb-page" data-href="https://www.facebook.com/ThailandYellowPages" data-width="350" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true" data-show-posts="false"><div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/ThailandYellowPages"><a href="https://www.facebook.com/ThailandYellowPages">Thailand YellowPages</a></blockquote></div></div></div>');
}
$build = array();
$build[] = array(
'#markup' => $facebook,
);
return $build;
}
}
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Dec 22, 2:50 PM (1 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
193470
Attached To
rPF typ_profile
Event Timeline
Log In to Comment