user.class.php 592 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * @file
  4. * Define Linkit user search plugin class.
  5. */
  6. /**
  7. * Reprecents a Linkit user search plugin.
  8. */
  9. class LinkitSearchPluginUser extends LinkitSearchPluginEntity {
  10. /**
  11. * Overrides LinkitSearchPluginEntity::__construct().
  12. */
  13. function __construct($plugin, $profile) {
  14. /**
  15. * The user entity doesn't add any label in their entity keys as they define a
  16. * "label callback" instead. Therefore we have to tell which field the user
  17. * entity have as label.
  18. */
  19. $this->entity_field_label = 'name';
  20. parent::__construct($plugin, $profile);
  21. }
  22. }