You are here

function flippy_entity_extra_field_info in Flippy 8

Implements hook_entity_extra_field_info().

File

./flippy.module, line 349
Allows administrators to add previous/next pagers to any node type.

Code

function flippy_entity_extra_field_info() {
  $extra = [];
  foreach (node_type_get_names() as $type => $name) {
    $flippy_node_type = \Drupal::config('flippy.settings')
      ->get('flippy_' . $type);
    if ($flippy_node_type) {
      $extra['node'][$type] = [
        'display' => [
          'flippy_pager' => [
            'label' => t('Pager'),
            'description' => t('Flippy module content pager.'),
            'weight' => 5,
            'visible' => TRUE,
          ],
        ],
      ];
    }
  }
  return $extra;
}