summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/node
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/node')
-rw-r--r--core/modules/node/node.module9
-rw-r--r--core/modules/node/src/Hook/NodeHooks1.php2
-rw-r--r--core/modules/node/src/NodeAccessControlHandlerInterface.php2
-rw-r--r--core/modules/node/src/NodeGrantDatabaseStorageInterface.php6
-rw-r--r--core/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php4
5 files changed, 20 insertions, 3 deletions
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 4ee3c48a00b2..f14d843faa10 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -387,6 +387,11 @@ function node_form_system_themes_admin_form_submit($form, FormStateInterface $fo
}
/**
+ * @addtogroup node_access
+ * @{
+ */
+
+/**
* Fetches an array of permission IDs granted to the given user ID.
*
* The implementation here provides only the universal "all" grant. A node
@@ -658,6 +663,10 @@ function _node_access_rebuild_batch_finished($success, $results, $operations): v
}
/**
+ * @} End of "addtogroup node_access".
+ */
+
+/**
* Marks a node to be re-indexed by the node_search plugin.
*
* @param int $nid
diff --git a/core/modules/node/src/Hook/NodeHooks1.php b/core/modules/node/src/Hook/NodeHooks1.php
index 8e25f2eb066c..d2dbf545c3ca 100644
--- a/core/modules/node/src/Hook/NodeHooks1.php
+++ b/core/modules/node/src/Hook/NodeHooks1.php
@@ -92,7 +92,7 @@ class NodeHooks1 {
case 'entity.entity_view_display.node.default':
case 'entity.entity_view_display.node.view_mode':
$type = $route_match->getParameter('node_type');
- return '<p>' . $this->t('Content items can be displayed using different view modes: Teaser, Full content, Print, RSS, etc. <em>Teaser</em> is a short format that is typically used in lists of multiple content items. <em>Full content</em> is typically used when the content is displayed on its own page.') . '</p>' . '<p>' . $this->t('Here, you can define which fields are shown and hidden when %type content is displayed in each view mode, and define how the fields are displayed in each view mode.', ['%type' => $type->label()]) . '</p>';
+ return '<p>' . $this->t('Content items can be displayed using different view modes: Teaser, Full content, Print, RSS, etc. <em>Teaser</em> is a short format that is typically used in lists of multiple content items. <em>Full content</em> is typically used when the content is displayed on its own page.') . '</p><p>' . $this->t('Here, you can define which fields are shown and hidden when %type content is displayed in each view mode, and define how the fields are displayed in each view mode.', ['%type' => $type->label()]) . '</p>';
case 'entity.node.version_history':
return '<p>' . $this->t('Revisions allow you to track differences between multiple versions of your content, and revert to older versions.') . '</p>';
diff --git a/core/modules/node/src/NodeAccessControlHandlerInterface.php b/core/modules/node/src/NodeAccessControlHandlerInterface.php
index 588391394eec..0d67cfb7bd69 100644
--- a/core/modules/node/src/NodeAccessControlHandlerInterface.php
+++ b/core/modules/node/src/NodeAccessControlHandlerInterface.php
@@ -30,6 +30,8 @@ interface NodeAccessControlHandlerInterface {
/**
* Creates the default node access grant entry on the grant storage.
+ *
+ * @see \Drupal\node\NodeGrantDatabaseStorageInterface::writeDefault()
*/
public function writeDefaultGrant();
diff --git a/core/modules/node/src/NodeGrantDatabaseStorageInterface.php b/core/modules/node/src/NodeGrantDatabaseStorageInterface.php
index cce744765630..5e81e1d04d0b 100644
--- a/core/modules/node/src/NodeGrantDatabaseStorageInterface.php
+++ b/core/modules/node/src/NodeGrantDatabaseStorageInterface.php
@@ -83,6 +83,12 @@ interface NodeGrantDatabaseStorageInterface {
/**
* Creates the default node access grant entry.
+ *
+ * The default node access grant is a special grant added to the node_access
+ * table when no modules implement hook_node_grants. It grants view access
+ * to any published node.
+ *
+ * @see self::access()
*/
public function writeDefault();
diff --git a/core/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php b/core/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php
index 1887bc56ea6c..201e781d1963 100644
--- a/core/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php
+++ b/core/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php
@@ -32,14 +32,14 @@ class NodeTestHooks {
];
// Add content that should be displayed only in the RSS feed.
$build['extra_feed_content'] = [
- '#markup' => '<p>' . 'Extra data that should appear only in the RSS feed for node ' . $node->id() . '.</p>',
+ '#markup' => '<p>Extra data that should appear only in the RSS feed for node ' . $node->id() . '.</p>',
'#weight' => 10,
];
}
if ($view_mode != 'rss') {
// Add content that should NOT be displayed in the RSS feed.
$build['extra_non_feed_content'] = [
- '#markup' => '<p>' . 'Extra data that should appear everywhere except the RSS feed for node ' . $node->id() . '.</p>',
+ '#markup' => '<p>Extra data that should appear everywhere except the RSS feed for node ' . $node->id() . '.</p>',
];
}
}