diff -u b/simplify.module b/simplify.module --- b/simplify.module +++ b/simplify.module @@ -17,7 +17,7 @@ $form['simplify'] = array( '#type' => 'details', '#title' => t('Simplify'), - '#description' => t("These fields will be hidden from @type node forms. Disabled checkboxes indicate fields that have been hidden globally on the Simplify administration page.", array('@type' => $form['name']['#default_value'], '@global' => Url::fromRoute('simplify.admin'))), + '#description' => t("These fields will be hidden from @type node forms. Disabled checkboxes indicate fields that have been hidden globally on the Simplify administration page.", array('@type' => $form['name']['#default_value'], '@global' => Url::fromRoute('simplify.admin')->toString())), '#access' => \Drupal::currentUser()->hasPermission('administer simplify'), '#group' => 'additional_settings', ); @@ -62,7 +62,7 @@ $form['comment']['simplify'] = array( '#type' => 'details', '#title' => t('Simplify'), - '#description' => t("These fields will be hidden from @type comment forms. Disabled checkboxes indicate fields that have been hidden globally on the Simplify administration page.", array('@type' => $form['label']['#default_value'], '@global' => Url::fromRoute('simplify.admin'))), + '#description' => t("These fields will be hidden from @type comment forms. Disabled checkboxes indicate fields that have been hidden globally on the Simplify administration page.", array('@type' => $form['label']['#default_value'], '@global' => Url::fromRoute('simplify.admin')->toString())), '#access' => \Drupal::currentUser()->hasPermission('administer simplify'), '#collapsible' => TRUE, '#collapsed' => TRUE, @@ -108,7 +108,7 @@ $form['simplify'] = array( '#type' => 'details', '#title' => t('Simplify'), - '#description' => t("These fields will be hidden from @vocabulary taxonomy term forms. Disabled checkboxes indicate fields that have been hidden globally on the Simplify administration page.", array('@vocabulary' => $form['name']['#default_value'], '@global' => Url::fromRoute('simplify.admin'))), + '#description' => t("These fields will be hidden from @vocabulary taxonomy term forms. Disabled checkboxes indicate fields that have been hidden globally on the Simplify administration page.", array('@vocabulary' => $form['name']['#default_value'], '@global' => Url::fromRoute('simplify.admin')->toString())), '#access' => \Drupal::currentUser()->hasPermission('administer simplify'), '#group' => 'additional_settings', ); @@ -152,7 +152,7 @@ $form['simplify'] = array( '#type' => 'details', '#title' => t('Simplify'), - '#description' => t("These fields will be hidden from @type block forms. Disabled checkboxes indicate fields that have been hidden globally on the Simplify administration page.", array('@type' => $form['label']['#default_value'], '@global' => Url::fromRoute('simplify.admin'))), + '#description' => t("These fields will be hidden from @type block forms. Disabled checkboxes indicate fields that have been hidden globally on the Simplify administration page.", array('@type' => $form['label']['#default_value'], '@global' => Url::fromRoute('simplify.admin')->toString())), '#access' => \Drupal::currentUser()->hasPermission('administer simplify'), '#group' => 'additional_settings', ); diff -u b/src/Tests/PerBlockTypeSettingsTest.php b/src/Tests/PerBlockTypeSettingsTest.php --- b/src/Tests/PerBlockTypeSettingsTest.php +++ b/src/Tests/PerBlockTypeSettingsTest.php @@ -10,6 +10,7 @@ namespace Drupal\simplify\Tests; use Drupal\simpletest\WebTestBase; +use Drupal\taxonomy\Entity\Vocabulary; /** * Test simplify per block-type settings. @@ -138,7 +139,7 @@ * Created custom block type. */ protected function createBlockContentType($label, $create_body = FALSE) { - $bundle = entity_create('block_content_type', array( + $bundle = Vocabulary::create(array( 'id' => $label, 'label' => $label, 'revision' => TRUE, diff -u b/src/Tests/PerVocabularySettingsTest.php b/src/Tests/PerVocabularySettingsTest.php --- b/src/Tests/PerVocabularySettingsTest.php +++ b/src/Tests/PerVocabularySettingsTest.php @@ -10,6 +10,7 @@ namespace Drupal\simplify\Tests; use Drupal\simpletest\WebTestBase; +use Drupal\taxonomy\Entity\Vocabulary; /** * Test simplify per vocabulary settings. @@ -48,7 +49,7 @@ $this->drupalLogin($admin_user); // Create a vocabulary. - $vocabulary = entity_create('taxonomy_vocabulary', array( + $vocabulary = Vocabulary::create(array( 'name' => $this->randomMachineName(), 'description' => $this->randomMachineName(), 'vid' => 'testing_vocabulary',