Commit 578367ad authored by Samuel Mortenson's avatar Samuel Mortenson Committed by Sam Mortenson
Browse files

Issue #3290189 by Project Update Bot, samuel.mortenson: Automated Drupal 10 compatibility fixes

parent 749f425a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,11 +4,12 @@ namespace Drupal\type_style\TwigExtension;

use Twig\TwigFunction;
use Drupal\Core\Entity\EntityInterface;
use Twig\Extension\AbstractExtension;

/**
 * A Twig extension to render type styles.
 */
class TypeStyleExtension extends \Twig_Extension {
class TypeStyleExtension extends AbstractExtension {

  /**
   * Generates a list of all Twig functions that this extension defines.
+3 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ class TypeStyleTest extends BrowserTestBase {
  /**
   * {@inheritdoc}
   */
  public static $modules = ['type_style', 'node'];
  protected static $modules = ['type_style', 'node'];

  /**
   * {@inheritdoc}
@@ -42,7 +42,8 @@ class TypeStyleTest extends BrowserTestBase {
      'type_style[color]' => '#ffffff',
      'type_style[icon]' => 'my-icon',
    ];
    $this->drupalPostForm('/admin/structure/types/manage/article', $edit, t('Save content type'));
    $this->drupalGet('/admin/structure/types/manage/article');
    $this->submitForm($edit, t('Save content type'));
    // Ensure that the configuration form contains the correct settings.
    $this->drupalGet('/admin/structure/types/manage/article');
    $this->assertSession()->pageTextContains('Style settings');
+2 −1
Original line number Diff line number Diff line
<?php

use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
/**
 * @file
 * Hooks related to Type Style module.
@@ -21,7 +22,7 @@
 * @param \Drupal\Core\Config\Entity\ConfigEntityBundleBase $type
 *   The type being edited.
 */
function hook_type_style_form_alter(array &$form, \Drupal\Core\Config\Entity\ConfigEntityBundleBase $type) {
function hook_type_style_form_alter(array &$form, ConfigEntityBundleBase $type) {
  $label = $type->getEntityType()->getLabel();
  $settings = $type->getThirdPartySettings('type_style');