Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 182a18e4 authored by escuriola's avatar escuriola
Browse files

OEL-1367: Removed block region suggestion, only layout field to determine...

OEL-1367: Removed block region suggestion, only layout field to determine search block look & field.
parent b1755a57
No related branches found
No related tags found
2 merge requests!157OEL-1668: Update epic list pages.,!136OEL-1367: New Look & Feel for search form in search page and remove theming from block config form.
......@@ -50,18 +50,6 @@ function oe_whitelabel_search_preprocess_facets_summary_item_list(array &$variab
$variables['items'] = $items;
}
use Drupal\block\Entity\Block;
/**
* Implements hook_preprocess_HOOK().
*/
function oe_whitelabel_search_preprocess_block(&$variables) {
if ($variables['plugin_id'] === 'whitelabel_search_block') {
$block = Block::load($variables['elements']['#id']);
$variables['content']['#region'] = $block->getRegion();
}
}
/**
* Implements hook_theme_suggestions_HOOK_alter().
*/
......
......@@ -47,6 +47,8 @@ class SearchForm extends FormBase {
public function buildForm(array $form, FormStateInterface $form_state, array $config = NULL): array {
$form_state->set('oe_whitelabel_search_config', $config);
$form['#region'] = $config['form']['layout'];
$form['search_input'] = [
'#type' => 'textfield',
'#title' => $this->t('Search'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment