You are here

function social_simple_entity_extra_field_info in Social simple 8

Same name and namespace in other branches
  1. 2.0.x social_simple.module \social_simple_entity_extra_field_info()

Implements hook_entity_extra_field_info().

File

./social_simple.module, line 34
Contains social.module..

Code

function social_simple_entity_extra_field_info() {
  $extra = [];

  /** @var \Drupal\node\Entity\NodeType $bundle */
  foreach (NodeType::loadMultiple() as $bundle) {
    if ($bundle
      ->getThirdPartySetting('social_simple', 'share', 0)) {
      $extra['node'][$bundle
        ->Id()]['display']['social_simple_buttons'] = [
        'label' => t('Social simple buttons'),
        'description' => t('Simple Social share buttons'),
        'weight' => 100,
        'visible' => FALSE,
      ];
    }
  }
  return $extra;
}