Guest User

Untitled

a guest
Nov 13th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. function views1U_views_data_alter(array &$data)
  2. {
  3. $data['node']['hello'] = array(
  4. 'title' => t('Node Custom'),
  5. 'field' => array(
  6. 'title' => t('Node Custom'),
  7. 'help' => t('My node custom'),
  8. 'id' => 'hello',
  9. ),
  10. );
  11. }
  12.  
  13. <?php
  14.  
  15. namespace Drupalviews1UPluginviewsfield;
  16.  
  17. use DrupalCoreFormFormStateInterface;
  18. use DrupalnodeEntityNodeType;
  19. use DrupalviewsPluginviewsfieldFieldPluginBase;
  20. use DrupalviewsResultRow;
  21.  
  22. /**
  23. * Field handler to flag the node type.
  24. *
  25. * @ingroup views_field_handlers
  26. *
  27. * @ViewsField("hello")
  28. */
  29. class NodeCustom extends FieldPluginBase
  30. {
  31. ........
  32. }
Add Comment
Please, Sign In to add comment