Commit 97b5c6d7 authored by catch's avatar catch

Issue #1817698 by andyceo: Move contextual links field handler out of...

Issue #1817698 by andyceo: Move contextual links field handler out of views.views.inc and put it into contextual_links() module.
parent b2ca0f41
<?php
/**
* @file
* Provide views data and handlers for contextual.module.
*
* @ingroup views_module_handlers
*/
/**
* Implements hook_views_data_alter().
*/
function contextual_views_data_alter(&$data) {
$data['views']['contextual_links'] = array(
'title' => t('Contextual Links'),
'help' => t('Display fields in a contextual links menu.'),
'field' => array(
'id' => 'contextual_links',
),
);
}
......@@ -2,12 +2,13 @@
/**
* @file
* Definition of Drupal\views\Plugin\views\field\ContextualLinks.
* Definition of Drupal\contextual\Plugin\views\field\ContextualLinks.
*/
namespace Drupal\views\Plugin\views\field;
namespace Drupal\contextual\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\field\FieldPluginBase;
/**
* Provides a handler that adds contextual links.
......@@ -15,7 +16,8 @@
* @ingroup views_field_handlers
*
* @Plugin(
* id = "contextual_links"
* id = "contextual_links",
* module = "contextual"
* )
*/
class ContextualLinks extends FieldPluginBase {
......
......@@ -90,16 +90,6 @@ function views_views_data() {
),
);
if (module_exists('contextual')) {
$data['views']['contextual_links'] = array(
'title' => t('Contextual Links'),
'help' => t('Display fields in a contextual links menu.'),
'field' => array(
'id' => 'contextual_links',
),
);
}
$data['views']['combine'] = array(
'title' => t('Combine fields filter'),
'help' => t('Combine two fields together and search by them.'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment