This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define the exposed form elements | |
$form['actions']['submit']['#states'] = [ | |
'visible' => [ | |
':input[name="choose_selector_container[choose_selector]"]' => ['value' => 'coincidence'], | |
], | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_preprocess_views_view_table(). | |
*/ | |
function basf_views_preprocess_views_view_table(&$variables): void { | |
/** @var \Drupal\views\ViewExecutable $view */ | |
$view = $variables['view']; | |
$trows = []; | |
$thead = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_preprocess_views_view(). | |
*/ | |
function basf_views_preprocess_views_view(&$variables): void { | |
global $language; | |
$view = $variables['view']; | |
if ($view->id() === 'search' && $view->current_display === 'search_page') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 'organism_cta': | |
switch ($entityType) { | |
case 'overview': | |
// Adds field_align validation. | |
$element['subform']['field_media']['widget']['#required'] = TRUE; | |
$element["subform"]["field_align"]['#attributes']['name'] = 'field_align'; | |
$element["subform"]["field_media"]['#states'] = [ | |
'invisible' => [ | |
':input[name="field_call_to_action[0][subform][field_align]"]' => [ | |
'value' => 'center', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Validate Carousel gallery paragraph. | |
* | |
* @param array $element | |
* Reference form array. | |
* | |
* @param \Drupal\Core\Form\FormStateInterface $formState | |
* Form state object. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_field_widget_paragraphs_form_alter(). | |
*/ | |
function basf_site_field_widget_paragraphs_browser_form_alter( | |
&$element, | |
FormStateInterface $formState, | |
): void | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\basf_twig\BridgeElements\Atom; | |
use Drupal\basf_twig\BridgeElements\ElementInterface; | |
use Drupal\paragraphs\ParagraphInterface; | |
class ListGroup implements ElementInterface { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
name, | |
(SELECT COUNT(artist_id) FROM band_members WHERE band_members.band_id = bands.id) | |
FROM bands; |
NewerOlder