ckeditor_mentions-8.x-2.x-dev/tests/modules/ckeditor_mentions_user_test/ckeditor_mentions_user_test.module

tests/modules/ckeditor_mentions_user_test/ckeditor_mentions_user_test.module
<?php

/**
 * @file
 * Contain main hooks for ckeditor_mentions_user_test module.
 */

use Drupal\Core\Database\Query\AlterableInterface;

/**
 * Implements hook_query_TAG_alter().
 */
function ckeditor_mentions_user_test_query_ckeditor_mentions_user_test_alter(AlterableInterface $query) {
  /** @var \Drupal\ckeditor_mentions_user_test\Plugin\MentionsType\UserTestMentionType $plugin */
  $plugin = $query->getMetaData('plugin');
  if ($plugin->getMatch() === 'test_query_alter') {
    $conditions = &$query->conditions()[0]['field']->conditions();
    $conditions[0]['value'] = '%Jho%';
    $conditions[1]['value'] = '%Jho%';
  }
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc