Loading src/Plugin/Derivative/BookSitemapDeriver.php +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class BookSitemapDeriver extends DeriverBase implements ContainerDeriverInterfac $this->derivatives[$id] = $base_plugin_definition; $this->derivatives[$id]['title'] = $this->t('Book: @book', ['@book' => $book['title']]); $this->derivatives[$id]['description'] = $book['type']; $this->derivatives[$id]['settings']['title'] = ''; $this->derivatives[$id]['settings']['title'] = NULL; $this->derivatives[$id]['book'] = $id; $this->derivatives[$id]['config_dependencies']['config'] = ['book.settings']; } Loading src/Plugin/Derivative/MenuSitemapDeriver.php +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class MenuSitemapDeriver extends DeriverBase implements ContainerDeriverInterfac $this->derivatives[$menu] = $base_plugin_definition; $this->derivatives[$menu]['title'] = $this->t('Menu: @menu', ['@menu' => $entity->label()]); $this->derivatives[$menu]['description'] = $entity->getDescription(); $this->derivatives[$menu]['settings']['title'] = ''; $this->derivatives[$menu]['settings']['title'] = NULL; $this->derivatives[$menu]['menu'] = $entity->id(); $this->derivatives[$menu]['config_dependencies']['config'] = [$entity->getConfigDependencyName()]; } Loading src/Plugin/Derivative/VocabularySitemapDeriver.php +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class VocabularySitemapDeriver extends DeriverBase implements ContainerDeriverIn $this->derivatives[$id] = $base_plugin_definition; $this->derivatives[$id]['title'] = $this->t('Vocabulary: @vocabulary', ['@vocabulary' => $vocabulary->label()]); $this->derivatives[$id]['description'] = $vocabulary->getDescription(); $this->derivatives[$id]['settings']['title'] = ''; $this->derivatives[$id]['settings']['title'] = NULL; $this->derivatives[$id]['vocabulary'] = $vocabulary->id(); $this->derivatives[$id]['config_dependencies']['config'] = [$vocabulary->getConfigDependencyName()]; } Loading src/Plugin/Sitemap/Book.php +2 −2 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ use Drupal\sitemap\SitemapBase; * title = @Translation("Book name"), * description = @Translation("Book type"), * settings = { * "title" = "", * "title" = NULL, * "show_expanded" = TRUE, * }, * deriver = "Drupal\sitemap\Plugin\Derivative\BookSitemapDeriver", Loading @@ -33,7 +33,7 @@ class Book extends SitemapBase { // Provide the book name as the default title. $bid = $this->getPluginDefinition()['book']; $book = \Drupal::entityTypeManager()->getStorage('node')->load($bid); $form['title']['#default_value'] = $this->settings['title'] ?: $book->label(); $form['title']['#default_value'] = $this->settings['title'] ?? $book->label(); $form['show_expanded'] = [ '#type' => 'checkbox', Loading src/Plugin/Sitemap/Frontpage.php +1 −4 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use Drupal\Core\Form\FormStateInterface; * title = @Translation("Site front page"), * description = @Translation("Displays a sitemap link for the site front page."), * settings = { * "title" = "Front page", * "title" = @Translation("Front page"), * "rss" = "/rss.xml", * }, * enabled = TRUE, Loading @@ -28,9 +28,6 @@ class Frontpage extends SitemapBase { public function settingsForm(array $form, FormStateInterface $form_state) { $form = parent::settingsForm($form, $form_state); // Provide a default title. $form['title']['#default_value'] = $this->settings['title'] ?: $this->t('Front page'); // @todo Convert to route instead of relative html path. $form['rss'] = [ '#type' => 'textfield', Loading Loading
src/Plugin/Derivative/BookSitemapDeriver.php +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class BookSitemapDeriver extends DeriverBase implements ContainerDeriverInterfac $this->derivatives[$id] = $base_plugin_definition; $this->derivatives[$id]['title'] = $this->t('Book: @book', ['@book' => $book['title']]); $this->derivatives[$id]['description'] = $book['type']; $this->derivatives[$id]['settings']['title'] = ''; $this->derivatives[$id]['settings']['title'] = NULL; $this->derivatives[$id]['book'] = $id; $this->derivatives[$id]['config_dependencies']['config'] = ['book.settings']; } Loading
src/Plugin/Derivative/MenuSitemapDeriver.php +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class MenuSitemapDeriver extends DeriverBase implements ContainerDeriverInterfac $this->derivatives[$menu] = $base_plugin_definition; $this->derivatives[$menu]['title'] = $this->t('Menu: @menu', ['@menu' => $entity->label()]); $this->derivatives[$menu]['description'] = $entity->getDescription(); $this->derivatives[$menu]['settings']['title'] = ''; $this->derivatives[$menu]['settings']['title'] = NULL; $this->derivatives[$menu]['menu'] = $entity->id(); $this->derivatives[$menu]['config_dependencies']['config'] = [$entity->getConfigDependencyName()]; } Loading
src/Plugin/Derivative/VocabularySitemapDeriver.php +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class VocabularySitemapDeriver extends DeriverBase implements ContainerDeriverIn $this->derivatives[$id] = $base_plugin_definition; $this->derivatives[$id]['title'] = $this->t('Vocabulary: @vocabulary', ['@vocabulary' => $vocabulary->label()]); $this->derivatives[$id]['description'] = $vocabulary->getDescription(); $this->derivatives[$id]['settings']['title'] = ''; $this->derivatives[$id]['settings']['title'] = NULL; $this->derivatives[$id]['vocabulary'] = $vocabulary->id(); $this->derivatives[$id]['config_dependencies']['config'] = [$vocabulary->getConfigDependencyName()]; } Loading
src/Plugin/Sitemap/Book.php +2 −2 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ use Drupal\sitemap\SitemapBase; * title = @Translation("Book name"), * description = @Translation("Book type"), * settings = { * "title" = "", * "title" = NULL, * "show_expanded" = TRUE, * }, * deriver = "Drupal\sitemap\Plugin\Derivative\BookSitemapDeriver", Loading @@ -33,7 +33,7 @@ class Book extends SitemapBase { // Provide the book name as the default title. $bid = $this->getPluginDefinition()['book']; $book = \Drupal::entityTypeManager()->getStorage('node')->load($bid); $form['title']['#default_value'] = $this->settings['title'] ?: $book->label(); $form['title']['#default_value'] = $this->settings['title'] ?? $book->label(); $form['show_expanded'] = [ '#type' => 'checkbox', Loading
src/Plugin/Sitemap/Frontpage.php +1 −4 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use Drupal\Core\Form\FormStateInterface; * title = @Translation("Site front page"), * description = @Translation("Displays a sitemap link for the site front page."), * settings = { * "title" = "Front page", * "title" = @Translation("Front page"), * "rss" = "/rss.xml", * }, * enabled = TRUE, Loading @@ -28,9 +28,6 @@ class Frontpage extends SitemapBase { public function settingsForm(array $form, FormStateInterface $form_state) { $form = parent::settingsForm($form, $form_state); // Provide a default title. $form['title']['#default_value'] = $this->settings['title'] ?: $this->t('Front page'); // @todo Convert to route instead of relative html path. $form['rss'] = [ '#type' => 'textfield', Loading