summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src
diff options
context:
space:
mode:
authorLauri Eskola2017-07-03 15:35:13 (GMT)
committerLauri Eskola2017-07-03 15:35:13 (GMT)
commit7f27bbaba141ff4073a89bb602cee141f2fefe1e (patch)
tree12173caaee666221954495f5451fecd063ddec75 /core/modules/node/src
parentb5a3346f32f3fea65ec4c1e602c702a20caa6d97 (diff)
Issue #2704871 by pepegarciag, Mile23, Manuel Garcia, ieguskiza, snehi, gaurav.pahuja, dimaro, rajeshwari10, gargsuchi, pashupathi nath gajawada, penyaskito, xjm, ZeiP, Wim Leers, alexpott: Replace usages of deprecated method drupal_render()
Diffstat (limited to 'core/modules/node/src')
-rw-r--r--core/modules/node/src/NodeListBuilder.php2
-rw-r--r--core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/node/src/NodeListBuilder.php b/core/modules/node/src/NodeListBuilder.php
index 6266649..4dbdf27 100644
--- a/core/modules/node/src/NodeListBuilder.php
+++ b/core/modules/node/src/NodeListBuilder.php
@@ -110,7 +110,7 @@ class NodeListBuilder extends EntityListBuilder {
$row['title']['data'] = [
'#type' => 'link',
'#title' => $entity->label(),
- '#suffix' => ' ' . drupal_render($mark),
+ '#suffix' => ' ' . \Drupal::service('renderer')->render($mark),
'#url' => $uri,
];
$row['type'] = node_get_type_label($entity);
diff --git a/core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php b/core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php
index c008188..3709853 100644
--- a/core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php
+++ b/core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php
@@ -24,7 +24,7 @@ class UnpublishByKeywordNode extends ConfigurableActionBase {
public function execute($node = NULL) {
foreach ($this->configuration['keywords'] as $keyword) {
$elements = node_view(clone $node);
- if (strpos(drupal_render($elements), $keyword) !== FALSE || strpos($node->label(), $keyword) !== FALSE) {
+ if (strpos(\Drupal::service('renderer')->render($elements), $keyword) !== FALSE || strpos($node->label(), $keyword) !== FALSE) {
$node->setPublished(FALSE);
$node->save();
break;