You are here

function replicate_ui_views_data_alter in Replicate UI 7

Same name and namespace in other branches
  1. 8 replicate_ui.views.inc \replicate_ui_views_data_alter()

Implements hook_views_data_alter().

File

views/replicate_ui.views.inc, line 10
Views integration for Replicate API.

Code

function replicate_ui_views_data_alter(&$views_data) {

  // allow for intergration with all entity types
  $types = entity_get_info();
  foreach ($types as $key => $type) {

    // create a structured link in the view to replicate entity
    $views_data['views_entity_' . $key]['replicate_ui_link'] = array(
      'field' => array(
        'title' => t('replicate link'),
        'help' => t('Provide a simple link to replicate the entity'),
        'handler' => 'views_handler_field_replicate_ui_link',
      ),
    );
  }
}