massive custom modules and themes D11 compatibility
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
name: Materio Serach API
|
||||
type: module
|
||||
description: 'Search Api Materio module'
|
||||
core_version_requirement: ^8.8 || ^9.2 || ^10.2
|
||||
core_version_requirement: ^8.8 || ^9.2 || ^10.2 || ^11
|
||||
package: 'Materio'
|
||||
dependencies:
|
||||
- search_api
|
||||
|
||||
@@ -20,6 +20,13 @@ use Drupal\core\render\RenderContext;
|
||||
*/
|
||||
class AjaxSearchForm extends ControllerBase {
|
||||
|
||||
/**
|
||||
* The built form array.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $form_builded;
|
||||
|
||||
/**
|
||||
* The form builder.
|
||||
*
|
||||
|
||||
@@ -17,7 +17,47 @@ use Drupal\search_api\Entity\Index;
|
||||
*/
|
||||
class Base extends ControllerBase {
|
||||
|
||||
/**
|
||||
* The search index.
|
||||
*
|
||||
* @var \Drupal\search_api\IndexInterface|null
|
||||
*/
|
||||
protected $index;
|
||||
|
||||
/**
|
||||
* The request parameters.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $allparams;
|
||||
|
||||
/**
|
||||
* The search keys.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $keys;
|
||||
|
||||
/**
|
||||
* The search results.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $results;
|
||||
|
||||
/**
|
||||
* The search queries and counters.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
protected $phrase_query, $and_query, $or_query, $query, $count_query, $count, $exactematch_count;
|
||||
|
||||
/**
|
||||
* Filter and term values.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
protected $filters, $terms, $items;
|
||||
|
||||
private $limit = 15;
|
||||
private $offset = 0;
|
||||
|
||||
@@ -19,9 +19,6 @@ class CountryNameComputed extends FieldItemList {
|
||||
$country_name = $full_country_list[$country_code];
|
||||
$lang = \Drupal::languageManager()->getCurrentLanguage()->getId();
|
||||
$translated_markup = $country_name->render();
|
||||
if($parent->id() == 5719){
|
||||
$t="t";
|
||||
}
|
||||
$this->list[0] = $this->createItem(0, $translated_markup);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ class MaterioSapiSearchForm extends FormBase {
|
||||
// '#type' => "label",
|
||||
//
|
||||
// ]
|
||||
$query = \Drupal::entityQuery('taxonomy_term');
|
||||
$query->condition('vid', "assisted_research")
|
||||
$query = \Drupal::entityQuery('taxonomy_term')
|
||||
->condition('vid', "assisted_research")
|
||||
->accessCheck(TRUE)
|
||||
->sort('field_weight', 'ASC');
|
||||
$tids = $query->execute();
|
||||
@@ -143,7 +143,7 @@ class MaterioSapiSearchForm extends FormBase {
|
||||
public function submitForm(array &$form, FormStateInterface $form_state) {
|
||||
// Display result.
|
||||
foreach ($form_state->getValues() as $key => $value) {
|
||||
drupal_set_message($key . ': ' . $value);
|
||||
\Drupal::messenger()->addStatus($key . ': ' . $value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user