Loading node_link_report.info.yml +1 −2 Original line number Diff line number Diff line Loading @@ -2,8 +2,7 @@ name: 'Node Link Report' type: module description: 'Adds a link report block to alert to broken links.' configure: node_link_report.node_link_report_admin_form core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^9.3 || ^10 package: 'Content' dependencies: - 'drupal:path_alias' src/Plugin/Block/NodeLinkReport.php +3 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\node_link_report\Plugin\Block; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\Access\AccessResult; use Drupal\Core\Block\BlockBase; use Drupal\Core\Cache\CacheBackendInterface; Loading Loading @@ -29,7 +30,7 @@ use Symfony\Component\HttpFoundation\RequestStack; */ class NodeLinkReport extends BlockBase implements ContainerFactoryPluginInterface { use \Drupal\Core\StringTranslation\StringTranslationTrait; use StringTranslationTrait; /** * The scheme and host of the current site. Loading Loading @@ -823,7 +824,7 @@ class NodeLinkReport extends BlockBase implements ContainerFactoryPluginInterfac // This might be a mistake, but seems to be working. $view_mode = 'bogus-view-mode-12345-giberish'; $build = $builder->view($node, $view_mode); $html = render($build); $html = \Drupal::service('renderer')->render($build); return $html; } Loading Loading
node_link_report.info.yml +1 −2 Original line number Diff line number Diff line Loading @@ -2,8 +2,7 @@ name: 'Node Link Report' type: module description: 'Adds a link report block to alert to broken links.' configure: node_link_report.node_link_report_admin_form core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^9.3 || ^10 package: 'Content' dependencies: - 'drupal:path_alias'
src/Plugin/Block/NodeLinkReport.php +3 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\node_link_report\Plugin\Block; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\Access\AccessResult; use Drupal\Core\Block\BlockBase; use Drupal\Core\Cache\CacheBackendInterface; Loading Loading @@ -29,7 +30,7 @@ use Symfony\Component\HttpFoundation\RequestStack; */ class NodeLinkReport extends BlockBase implements ContainerFactoryPluginInterface { use \Drupal\Core\StringTranslation\StringTranslationTrait; use StringTranslationTrait; /** * The scheme and host of the current site. Loading Loading @@ -823,7 +824,7 @@ class NodeLinkReport extends BlockBase implements ContainerFactoryPluginInterfac // This might be a mistake, but seems to be working. $view_mode = 'bogus-view-mode-12345-giberish'; $build = $builder->view($node, $view_mode); $html = render($build); $html = \Drupal::service('renderer')->render($build); return $html; } Loading