public function TweetbuttonFollowBlock::defaultConfiguration in Tweet Button 8
Overrides \Drupal\block\BlockBase::defaultConfiguration().
File
- lib/
Drupal/ tweetbutton/ Plugin/ Block/ TweetbuttonFollowBlock.php, line 37  - Contains \Drupal\tweetbutton\Plugin\Block\TweetbuttonFollowBlock.
 
Class
- TweetbuttonFollowBlock
 - Provides a 'Tweetbutton Follow' block.
 
Namespace
Drupal\tweetbutton\Plugin\BlockCode
public function defaultConfiguration() {
  $config = \Drupal::config('tweetbutton.settings');
  $default = array(
    'label_display' => FALSE,
    'show_count' => FALSE,
    'lang' => 'en',
    'width' => '',
    'align' => 'none',
    'show_screen_name' => TRUE,
    'size' => 'medium',
    'dnt' => FALSE,
  );
  if (!empty($config
    ->get('tweetbutton_follow_screen_name'))) {
    $default['screen_name'] = $config
      ->get('tweetbutton_follow_screen_name');
  }
  return $default;
}