commercetools-8.x-1.2-alpha1/tests/modules/commercetools_test/commercetools_test.module

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

/**
 * @file
 * Defines the commercetools_test module hooks.
 */

declare(strict_types=1);

use Drupal\Core\Form\FormStateInterface;

/**
 * Implements hook_form_alter().
 */
function commercetools_test_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  if ($form_id === 'commercetools_store_settings_form') {
    if (isset($form['items_per_page']['#min'])) {
      unset($form['items_per_page']['#min']);
    }
  }
}

/**
 * Implements hook_page_attachments().
 */
function commercetools_test_page_attachments(array &$attachments) {
  // A workaround for the issue
  // https://github.com/SeleniumHQ/selenium/issues/11136#issuecomment-1370803713
  $attachments['#attached']['library'][] = 'commercetools_test/global-styling';
}

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

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