Last active
November 11, 2015 12:36
-
-
Save dmrrlc/513cc522bbb0eaaad25b to your computer and use it in GitHub Desktop.
Entity reference filter with drupal 8 - mymodule.views.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_views_data_alter(). | |
*/ | |
function mymodule_views_data_alter(array &$data) { | |
$data['node_field_data']['related_content_titles'] = array( | |
'title' => t('Related content titles'), | |
'filter' => array( | |
'title' => t('Related content titles'), | |
'help' => t('Specify a list of titles a content node can have.'), | |
'field' => 'nid', | |
'id' => 'mymodule_related_content_titles' | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment