diff --git a/core/includes/batch.inc b/core/includes/batch.inc index ff0b4cb..aba311e 100644 --- a/core/includes/batch.inc +++ b/core/includes/batch.inc @@ -3,6 +3,11 @@ /** * @file * Batch processing API for processes to run in multiple HTTP requests. + */ + +use \Symfony\Component\HttpFoundation\JsonResponse; + + /** * * Note that batches are usually invoked by form submissions, which is * why the core interaction functions of the batch processing API live in @@ -14,8 +19,6 @@ * @see batch_get() */ -use \Symfony\Component\HttpFoundation\JsonResponse; - /** * Loads a batch from the database. * diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 77458a1..e4211ac 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -1,24 +1,25 @@ 'value', '#value' => $type->type); diff --git a/core/modules/node/content_types.js b/core/modules/node/content_types.js index 87fc460..dd0b5fe 100644 --- a/core/modules/node/content_types.js +++ b/core/modules/node/content_types.js @@ -1,3 +1,8 @@ +/** + * @file + * Javascript for the node content editing form. + */ + (function ($) { "use strict"; diff --git a/core/modules/node/lib/Drupal/node/Node.php b/core/modules/node/lib/Drupal/node/Node.php index 45d93f0..8bcb706 100644 --- a/core/modules/node/lib/Drupal/node/Node.php +++ b/core/modules/node/lib/Drupal/node/Node.php @@ -112,8 +112,8 @@ class Node extends Entity implements ContentEntityInterface { /** * The node promotion status. * - * Promoted nodes should be displayed on the front page of the site. The - * value is either NODE_PROMOTED or NODE_NOT_PROMOTED. + * Promoted nodes should be displayed on the front page of the site. The value + * is either NODE_PROMOTED or NODE_NOT_PROMOTED. * * @var integer */ @@ -142,7 +142,7 @@ class Node extends Entity implements ContentEntityInterface { /** * The node translation status. * - * If the translation page needs to be updated the value is 1, otherwise 0. + * If the translation page needs to be updated, the value is 1; otherwise 0. * * @var integer */ diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php index b9bf7eb..ad7d61d 100644 --- a/core/modules/node/lib/Drupal/node/NodeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeFormController.php @@ -7,8 +7,8 @@ namespace Drupal\node; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityFormController; +use Drupal\Core\Entity\EntityInterface; /** * Form controller for the node edit forms. diff --git a/core/modules/node/lib/Drupal/node/Tests/MultiStepNodeFormBasicOptionsTest.php b/core/modules/node/lib/Drupal/node/Tests/MultiStepNodeFormBasicOptionsTest.php index abb31f3..873c7ea 100644 --- a/core/modules/node/lib/Drupal/node/Tests/MultiStepNodeFormBasicOptionsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/MultiStepNodeFormBasicOptionsTest.php @@ -10,7 +10,7 @@ use Drupal\simpletest\WebTestBase; /** - * Test multistep node forms basic options. + * Tests basic options of multi-step node forms. */ class MultiStepNodeFormBasicOptionsTest extends WebTestBase { @@ -37,7 +37,7 @@ function setUp() { } /** - * Change the default values of basic options to ensure they persist. + * Tests changing the default values of basic options to ensure they persist. */ function testMultiStepNodeFormBasicOptions() { $edit = array( diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php index a8e36b2..edd387a 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessBaseTableTest.php @@ -19,7 +19,13 @@ class NodeAccessBaseTableTest extends NodeTestBase { */ public static $modules = array('node_access_test'); - // Requires tags taxonomy field. + /** + * The installation profile to use with this test. + * + * This test class requires tags taxonomy field. + * + * @var string + */ protected $profile = 'standard'; public static function getInfo() { @@ -30,9 +36,6 @@ public static function getInfo() { ); } - /** - * Enable modules and create user with specific permissions. - */ public function setUp() { parent::setUp(); @@ -41,7 +44,7 @@ public function setUp() { } /** - * Test the "private" node access. + * Tests the "private" node access functionality. * * - Create 2 users with "access content" and "create article" permissions. * - Each user creates one private and one not private article. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php index 021e228..6ff6ae0 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessLanguageTest.php @@ -10,7 +10,7 @@ use Drupal\Core\Language\Language; /** - * Test case to verify node_access functionality for multiple languages. + * Verifies node_access() functionality for multiple languages. */ class NodeAccessLanguageTest extends NodeTestBase { diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRebuildTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRebuildTest.php index 612ba36..beee6e5 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRebuildTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRebuildTest.php @@ -8,9 +8,10 @@ namespace Drupal\node\Tests; /** - * Rebuild the node_access table. + * Verifies the rebuild functionality for the node_access table. */ class NodeAccessRebuildTest extends NodeTestBase { + public static function getInfo() { return array( 'name' => 'Node access rebuild', @@ -27,6 +28,9 @@ function setUp() { $this->web_user = $web_user; } + /** + * Tests the rebuilding of node access permissions table. + */ function testNodeAccessRebuild() { $this->drupalGet('admin/reports/status'); $this->clickLink(t('Rebuild permissions')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php index 07a00cf..4225b1f 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessRecordsTest.php @@ -8,7 +8,7 @@ namespace Drupal\node\Tests; /** - * Test case to verify hook_node_access_records functionality. + * Test case to verify hook_node_access_records() functionality. */ class NodeAccessRecordsTest extends NodeTestBase { @@ -28,7 +28,7 @@ public static function getInfo() { } /** - * Create a node and test the creation of node access rules. + * Creates a node and tests the creation of node access rules. */ function testNodeAccessRecords() { // Create an article node. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessTest.php index 0c784ae..e7a36a7 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessTest.php @@ -9,10 +9,13 @@ /** * Test case to verify basic node_access functionality. + * + * Note hook_node_access_records() is covered in another test class. + * * @todo Cover hook_node_access in a separate test class. - * hook_node_access_records is covered in another test class. */ class NodeAccessTest extends NodeTestBase { + public static function getInfo() { return array( 'name' => 'Node access', @@ -22,7 +25,7 @@ public static function getInfo() { } /** - * Asserts node_access correctly grants or denies access. + * Asserts node_access() correctly grants or denies access. */ function assertNodeAccess($ops, $node, $account) { foreach ($ops as $op => $result) { diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php index 3c02765..bcfbfcd 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAdminTest.php @@ -8,9 +8,10 @@ namespace Drupal\node\Tests; /** - * Test node administration page functionality. + * Tests node administration page functionality. */ class NodeAdminTest extends NodeTestBase { + public static function getInfo() { return array( 'name' => 'Node administration', @@ -76,6 +77,7 @@ function testContentAdminSort() { * Tests content overview with different user permissions. * * Taxonomy filters are tested separately. + * * @see TaxonomyNodeFilterTestCase */ function testContentAdminPages() { diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php index edcb007..46b003f 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeBlockFunctionalTest.php @@ -36,7 +36,7 @@ function setUp() { } /** - * Test the recent comments block. + * Tests the recent comments block. */ function testRecentNodeBlock() { $this->drupalLogin($this->admin_user); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeBlockTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeBlockTest.php index 3775ac0..b46ed70 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeBlockTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeBlockTest.php @@ -7,6 +7,9 @@ namespace Drupal\node\Tests; +/** + * Tests the availability of the syndicate block. + */ class NodeBlockTest extends NodeTestBase { /** @@ -32,6 +35,9 @@ function setUp() { $this->drupalLogin($admin_user); } + /** + * Tests the availability of the syndicate block. + */ function testSearchFormBlock() { // Set block title to confirm that the interface is available. $this->drupalPost('admin/structure/block/manage/node/syndicate/configure', array('title' => $this->randomName(8)), t('Save block')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeBuildContentTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeBuildContentTest.php index 3f4d360..4fe9a3d 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeBuildContentTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeBuildContentTest.php @@ -21,7 +21,7 @@ public static function getInfo() { } /** - * Test to ensure that a node's content array is rebuilt on every call to node_build_content(). + * Ensures that content array is rebuilt on every call to node_build_content(). */ function testNodeRebuildContent() { $node = $this->drupalCreateNode(); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php index 241af5f..7367449 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeCreationTest.php @@ -10,6 +10,9 @@ use Drupal\Core\Database\Database; use Exception; +/** + * Tests the creation of and saving a node entity. + */ class NodeCreationTest extends NodeTestBase { /** @@ -37,7 +40,7 @@ function setUp() { } /** - * Create a "Basic page" node and verify its consistency in the database. + * Creates a "Basic page" node and verify its consistency in the database. */ function testNodeCreation() { // Create a node. @@ -56,7 +59,7 @@ function testNodeCreation() { } /** - * Create a page node and verify that a transaction rolls back the failed creation + * Verifies that a transaction rolls back the failed creation */ function testFailedPageCreation() { // Create a node. @@ -97,7 +100,7 @@ function testFailedPageCreation() { } /** - * Create an unpublished node and confirm correct redirect behavior. + * Creates an unpublished node and confirms correct redirect behavior. */ function testUnpublishedNodeCreation() { // Set "Basic page" content type to be unpublished by default. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeFeedTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeFeedTest.php index ca660e4..0fd06d1 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeFeedTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeFeedTest.php @@ -22,7 +22,7 @@ public static function getInfo() { } /** - * Ensure that node_feed accepts and prints extra channel elements. + * Ensures that node_feed() accepts and prints extra channel elements. */ function testNodeFeedExtraChannelElements() { $response = node_feed(array(), array('copyright' => 'Drupal is a registered trademark of Dries Buytaert.')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php index 838f855..b9bf745 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php @@ -65,7 +65,7 @@ function setUp() { } /** - * Test if field languages are correctly set through the node form. + * Tests if field languages are correctly set through the node form. */ function testMultilingualNodeForm() { // Create "Basic page" content. @@ -113,7 +113,7 @@ function testMultilingualNodeForm() { } /* - * Test multilingual field display settings. + * Tests multilingual field display settings. */ function testMultilingualDisplaySettings() { // Create "Basic page" content. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodePostSettingsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodePostSettingsTest.php index 375d50f..ce48614 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodePostSettingsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodePostSettingsTest.php @@ -8,9 +8,10 @@ namespace Drupal\node\Tests; /** - * Check that the post information displays when enabled for a content type. + * Checks that the post information displays when enabled for a content type. */ class NodePostSettingsTest extends NodeTestBase { + public static function getInfo() { return array( 'name' => 'Node post information display', @@ -27,7 +28,7 @@ function setUp() { } /** - * Set "Basic page" content type to display post information and confirm its presence on a new node. + * Confirms "Basic page" content type and post information is on a new node. */ function testPagePostInfo() { @@ -50,7 +51,7 @@ function testPagePostInfo() { } /** - * Set "Basic page" content type to not display post information and confirm its absence on a new node. + * Confirms absence of post information on a new node. */ function testPageNotPostInfo() { diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeQueryAlterTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeQueryAlterTest.php index 299a00c..9a7174f 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeQueryAlterTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeQueryAlterTest.php @@ -83,10 +83,10 @@ function testNodeQueryAlterWithUI() { } /** - * Lower-level test of 'node_access' query alter, for user with access. + * Tests 'node_access' query alter, for user with access. * - * Verifies that a non-standard table alias can be used, and that a - * user with node access can view the nodes. + * Verifies that a non-standard table alias can be used, and that a user with + * node access can view the nodes. */ function testNodeQueryAlterLowLevelWithAccess() { // User with access should be able to view 4 nodes. @@ -106,10 +106,10 @@ function testNodeQueryAlterLowLevelWithAccess() { } /** - * Lower-level test of 'node_access' query alter, for user without access. + * Tests 'node_access' query alter, for user without access. * - * Verifies that a non-standard table alias can be used, and that a - * user without node access cannot view the nodes. + * Verifies that a non-standard table alias can be used, and that a user + * without node access cannot view the nodes. */ function testNodeQueryAlterLowLevelNoAccess() { // User without access should be able to view 0 nodes. @@ -129,10 +129,10 @@ function testNodeQueryAlterLowLevelNoAccess() { } /** - * Lower-level test of 'node_access' query alter, for edit access. + * Tests 'node_access' query alter, for edit access. * - * Verifies that a non-standard table alias can be used, and that a - * user with view-only node access cannot edit the nodes. + * Verifies that a non-standard table alias can be used, and that a user with + * view-only node access cannot edit the nodes. */ function testNodeQueryAlterLowLevelEditAccess() { // User with view-only access should not be able to edit nodes. @@ -154,13 +154,13 @@ function testNodeQueryAlterLowLevelEditAccess() { } /** - * Lower-level test of 'node_access' query alter override. + * Tests 'node_access' query alter override. * * Verifies that node_access_view_all_nodes() is called from - * node_query_node_access_alter(). We do this by checking that - * a user which normally would not have view privileges is able - * to view the nodes when we add a record to {node_access} paired - * with a corresponding privilege in hook_node_grants(). + * node_query_node_access_alter(). We do this by checking that a user which + * normally would not have view privileges is able to view the nodes when we + * add a record to {node_access} paired with a corresponding privilege in + * hook_node_grants(). */ function testNodeQueryAlterOverride() { $record = array( diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php index e82ebcd..03690aa 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php @@ -8,7 +8,7 @@ namespace Drupal\node\Tests; /** - * Ensure that data added to nodes by other modules appears in RSS feeds. + * Ensures that data added to nodes by other modules appears in RSS feeds. * * Create a node, enable the node_test module to ensure that extra data is * added to the node->content array, then verify that the data appears on the @@ -42,8 +42,7 @@ function setUp() { } /** - * Create a new node and ensure that it includes the custom data when added - * to an RSS feed. + * Ensures that a new node includes the custom data when added to an RSS feed. */ function testNodeRSSContent() { // Create a node. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php index 5a40510..8b5ff1d 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php @@ -7,6 +7,9 @@ namespace Drupal\node\Tests; +/** + * Tests the node revision functionality. + */ class NodeRevisionsTest extends NodeTestBase { protected $nodes; protected $logs; @@ -58,7 +61,7 @@ function setUp() { } /** - * Check node revision related operations. + * Checks node revision related operations. */ function testRevisions() { $nodes = $this->nodes; diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php index f269bf3..1ebdae0 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeSaveTest.php @@ -8,7 +8,7 @@ namespace Drupal\node\Tests; /** - * Test case to check node save related functionality, including import-save + * Test case to check node save related functionality, including import-save. */ class NodeSaveTest extends NodeTestBase { @@ -37,7 +37,8 @@ function setUp() { } /** - * Import test, to check if custom node ids are saved properly. + * Checks if custom node ids are saved properly during an import operation. + * * Workflow: * - first create a piece of content * - save the content @@ -71,8 +72,7 @@ function testImport() { } /** - * Check that the "created" and "changed" timestamps are set correctly when - * saving a new node or updating an existing node. + * Verifies accuracy of the "created" and "changed" timestamp functionality. */ function testTimestamps() { // Use the default timestamps. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTestBase.php b/core/modules/node/lib/Drupal/node/Tests/NodeTestBase.php index 3c39279..7a07a16 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTestBase.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTestBase.php @@ -9,6 +9,9 @@ use Drupal\simpletest\WebTestBase; +/** + * Base test class for testing node entity functionality. + */ abstract class NodeTestBase extends WebTestBase { /** diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php index 1880d4f..d62a03e 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTitleTest.php @@ -8,7 +8,7 @@ namespace Drupal\node\Tests; /** - * Test node title. + * Tests node title functionality. */ class NodeTitleTest extends NodeTestBase { @@ -24,7 +24,7 @@ class NodeTitleTest extends NodeTestBase { public static function getInfo() { return array( 'name' => 'Node title', - 'description' => 'Test node title.', + 'description' => 'Test node title functionality.', 'group' => 'Node' ); } @@ -37,7 +37,7 @@ function setUp() { } /** - * Create one node and test if the node title has the correct value. + * Creates one node and tests if the node title has the correct value. */ function testNodeTitle() { // Create "Basic page" content with title. diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php index af30e19..061f958 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTitleXSSTest.php @@ -7,7 +7,11 @@ namespace Drupal\node\Tests; +/** + * Tests XSS functionality with a node entity. + */ class NodeTitleXSSTest extends NodeTestBase { + public static function getInfo() { return array( 'name' => 'Node title XSS filtering', @@ -16,6 +20,9 @@ public static function getInfo() { ); } + /** + * Tests XSS functionality with a node entity. + */ function testNodeTitleXSS() { // Prepare a user to do the stuff. $web_user = $this->drupalCreateUser(array('create page content', 'edit any page content')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php index e191eca..9dc6728 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php @@ -35,7 +35,7 @@ function setUp() { } /** - * Tests the node type initial language defaults, and modify them. + * Tests the node type initial language defaults, and modifies them. * * The default initial language must be the site's default, and the language * locked option must be on. @@ -95,7 +95,7 @@ function testNodeTypeInitialLanguageDefaults() { } /** - * Tests Language field visibility features. + * Tests language field visibility features. */ function testLanguageFieldVisibility() { $langcode = LANGUAGE_NOT_SPECIFIED; diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTypePersistenceTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTypePersistenceTest.php index c67f01a..3acdf1b 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTypePersistenceTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTypePersistenceTest.php @@ -20,7 +20,7 @@ public static function getInfo() { } /** - * Test node type customizations persist through disable and uninstall. + * Tests node type customizations persist through disable and uninstall. */ function testNodeTypeCustomizationPersistence() { $web_user = $this->drupalCreateUser(array('bypass node access', 'administer content types', 'administer modules')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTypeTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTypeTest.php index 3032789..32f2e2a 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTypeTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTypeTest.php @@ -28,7 +28,7 @@ public static function getInfo() { } /** - * Ensure that node type functions (node_type_get_*) work correctly. + * Ensures that node type functions (node_type_get_*) work correctly. * * Load available node types and validate the returned data. */ @@ -47,7 +47,7 @@ function testNodeTypeGetFunctions() { } /** - * Test creating a content type programmatically and via a form. + * Tests creating a content type programmatically and via a form. */ function testNodeTypeCreation() { // Create a content type programmaticaly. @@ -77,7 +77,7 @@ function testNodeTypeCreation() { } /** - * Test editing a node type using the UI. + * Tests editing a node type using the UI. */ function testNodeTypeEditing() { $web_user = $this->drupalCreateUser(array('bypass node access', 'administer content types')); @@ -130,7 +130,7 @@ function testNodeTypeEditing() { } /** - * Test that node_types_rebuild() correctly handles the 'disabled' flag. + * Tests that node_types_rebuild() correctly handles the 'disabled' flag. */ function testNodeTypeStatus() { // Enable all core node modules, and all types should be active. diff --git a/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php b/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php index 8d4e0fe..3bc0c2c 100644 --- a/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/PageEditTest.php @@ -7,6 +7,9 @@ namespace Drupal\node\Tests; +/** + * Tests the node edit functionality. + */ class PageEditTest extends NodeTestBase { protected $web_user; protected $admin_user; @@ -27,7 +30,7 @@ function setUp() { } /** - * Check node edit functionality. + * Checks node edit functionality. */ function testPageEdit() { $this->drupalLogin($this->web_user); @@ -94,7 +97,7 @@ function testPageEdit() { } /** - * Check changing node authored by fields. + * Checks changing node authored by fields. */ function testPageAuthoredBy() { $this->drupalLogin($this->admin_user); diff --git a/core/modules/node/lib/Drupal/node/Tests/PagePreviewTest.php b/core/modules/node/lib/Drupal/node/Tests/PagePreviewTest.php index 81e492e..b429e07 100644 --- a/core/modules/node/lib/Drupal/node/Tests/PagePreviewTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/PagePreviewTest.php @@ -7,6 +7,9 @@ namespace Drupal\node\Tests; +/** + * Tests the node entity preview functionality. + */ class PagePreviewTest extends NodeTestBase { public static function getInfo() { return array( @@ -24,7 +27,7 @@ function setUp() { } /** - * Check the node preview functionality. + * Checks the node preview functionality. */ function testPagePreview() { $langcode = LANGUAGE_NOT_SPECIFIED; @@ -48,7 +51,7 @@ function testPagePreview() { } /** - * Check the node preview functionality, when using revisions. + * Checks the node preview functionality, when using revisions. */ function testPagePreviewWithRevisions() { $langcode = LANGUAGE_NOT_SPECIFIED; diff --git a/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php b/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php index 460eb25..deab20a 100644 --- a/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/PageViewTest.php @@ -7,6 +7,9 @@ namespace Drupal\node\Tests; +/** + * Tests the functionality of node entity edit permissions. + */ class PageViewTest extends NodeTestBase { public static function getInfo() { return array( @@ -17,7 +20,7 @@ public static function getInfo() { } /** - * Creates a node and then an anonymous and unpermissioned user attempt to edit the node. + * Tests an anonymous and unpermissioned user attempting to edit the node. */ function testPageView() { // Create a node to view. diff --git a/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php b/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php index ffdca5b..1e4555a 100644 --- a/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/SummaryLengthTest.php @@ -7,7 +7,11 @@ namespace Drupal\node\Tests; +/** + * Tests the summary length functionality. + */ class SummaryLengthTest extends NodeTestBase { + public static function getInfo() { return array( 'name' => 'Summary length', @@ -17,7 +21,7 @@ public static function getInfo() { } /** - * Creates a node and then an anonymous and unpermissioned user attempt to edit the node. + * Tests the node summary length functionality. */ function testSummaryLength() { // Create a node to view. diff --git a/core/modules/node/node.admin-rtl.css b/core/modules/node/node.admin-rtl.css index d836f65..ba5f75f 100644 --- a/core/modules/node/node.admin-rtl.css +++ b/core/modules/node/node.admin-rtl.css @@ -1,4 +1,9 @@ /** + * @file + * Right-to-left styles for administration pages. + */ + +/** * Operations dropbuttons */ .dropbutton-widget { diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc index 2ca2d3e..bdc00ba 100644 --- a/core/modules/node/node.admin.inc +++ b/core/modules/node/node.admin.inc @@ -1,12 +1,12 @@ '', '#tree' => TRUE); @@ -700,13 +676,6 @@ function node_multiple_delete_confirm($form, &$form_state, $nodes) { /** * Form submission handler for node_multiple_delete_confirm(). - * - * @see node_admin_nodes() - * @see node_admin_nodes_submit() - * @see node_admin_nodes_validate() - * @see node_filter_form() - * @see node_filter_form_submit() - * @see node_multiple_delete_confirm() */ function node_multiple_delete_confirm_submit($form, &$form_state) { if ($form_state['values']['confirm']) { diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php index 2daa954..1e6ded4 100644 --- a/core/modules/node/node.api.php +++ b/core/modules/node/node.api.php @@ -13,8 +13,8 @@ * Functions to define and modify content types. * * Each content type is maintained by a primary module, which is either - * node.module (for content types created in the user interface) or the - * module that implements hook_node_info() to define the content type. + * node.module (for content types created in the user interface) or the module + * that implements hook_node_info() to define the content type. * * During node operations (create, update, view, delete, etc.), there are * several sets of hooks that get invoked to allow modules to modify the base @@ -24,10 +24,10 @@ * function prefix. For example, poll.module defines the base for the Poll * content type as "poll", so during creation of a poll node, hook_insert() is * only invoked by calling poll_insert(). - * - All-module hooks: This set of hooks is invoked on all implementing - * modules, to allow other modules to modify what the primary node module is - * doing. For example, hook_node_insert() is invoked on all modules when - * creating a poll node. + * - All-module hooks: This set of hooks is invoked on all implementing modules, + * to allow other modules to modify what the primary node module is doing. For + * example, hook_node_insert() is invoked on all modules when creating a poll + * node. * - Field hooks: Hooks related to the fields attached to the node. These are * invoked from the field operations functions described below, and can be * either field-type-specific or all-module hooks. @@ -58,7 +58,7 @@ * - hook_entity_update() (all) * - hook_node_access_records() (all) * - hook_node_access_records_alter() (all) - * - Loading a node (calling node_load(), node_load_multiple(), entity_load() + * - Loading a node (calling node_load(), node_load_multiple(), entity_load(), * or entity_load_multiple() with $entity_type of 'node'): * - Node and revision information is read from database. * - hook_load() (node-type-specific) @@ -66,8 +66,7 @@ * - hook_entity_load() (all) * - hook_node_load() (all) * - Viewing a single node (calling node_view() - note that the input to - * node_view() is a loaded node, so the Loading steps above are already - * done): + * node_view() is a loaded node, so the Loading steps above are already done): * - hook_view() (node-type-specific) * - field_attach_prepare_view() * - hook_entity_prepare_view() (all) @@ -101,9 +100,8 @@ * - Revision information is deleted from database * - hook_node_revision_delete() (all) * - field_attach_delete_revision() - * - Preparing a node for editing (calling node_form() - note that if it's - * an existing node, it will already be loaded; see the Loading section - * above): + * - Preparing a node for editing (calling node_form() - note that if it is an + * existing node, it will already be loaded; see the Loading section above): * - hook_prepare() (node-type-specific) * - hook_node_prepare() (all) * - hook_form() (node-type-specific) @@ -133,7 +131,7 @@ */ /** - * Inform the node access system what permissions the user has. + * Informs the node access system what permissions the user has. * * This hook is for implementation by node access modules. In this hook, * the module grants a user different "grant IDs" within one or more @@ -141,16 +139,16 @@ * associated with permission to view, edit, and delete individual nodes. * * The realms and grant IDs can be arbitrarily defined by your node access - * module; it is common to use role IDs as grant IDs, but that is not - * required. Your module could instead maintain its own list of users, where - * each list has an ID. In that case, the return value of this hook would be - * an array of the list IDs that this user is a member of. + * module; it is common to use role IDs as grant IDs, but that is not required. + * Your module could instead maintain its own list of users, where each list has + * an ID. In that case, the return value of this hook would be an array of the + * list IDs that this user is a member of. * - * A node access module may implement as many realms as necessary to - * properly define the access privileges for the nodes. Note that the system - * makes no distinction between published and unpublished nodes. It is the - * module's responsibility to provide appropriate realms to limit access to - * unpublished content. + * A node access module may implement as many realms as necessary to properly + * define the access privileges for the nodes. Note that the system makes no + * distinction between published and unpublished nodes. It is the module's + * responsibility to provide appropriate realms to limit access to unpublished + * content. * * Node access records are stored in the {node_access} table and define which * grants are required to access a node. There is a special case for the view @@ -184,7 +182,7 @@ * @param $account * The user object whose grants are requested. * @param $op - * The node operation to be performed, such as "view", "update", or "delete". + * The node operation to be performed, such as 'view', 'update', or 'delete'. * * @return * An array whose keys are "realms" of grants, and whose values are arrays of @@ -192,8 +190,9 @@ * * For a detailed example, see node_access_example.module. * - * @see node_access_view_all_nodes() * @see node_access_rebuild() + * @see node_access_view_all_nodes() + * * @ingroup node_access */ function hook_node_grants($account, $op) { @@ -205,7 +204,7 @@ function hook_node_grants($account, $op) { } /** - * Set permissions for a node to be written to the database. + * Sets permissions for a node to be written to the database. * * When a node is saved, a module implementing hook_node_access_records() will * be asked if it is interested in the access permissions for a node. If it is @@ -262,6 +261,8 @@ function hook_node_grants($account, $op) { * An array of grants as defined above. * * @see _node_access_write_grants() + * @see hook_node_access_records_alter() + * * @ingroup node_access */ function hook_node_access_records(Drupal\node\Node $node) { @@ -297,7 +298,7 @@ function hook_node_access_records(Drupal\node\Node $node) { } /** - * Alter permissions for a node before it is written to the database. + * Alters the permissions for a node before it is written to the database. * * Node access modules establish rules for user access to content. Node access * records are stored in the {node_access} table and define which permissions @@ -325,6 +326,7 @@ function hook_node_access_records(Drupal\node\Node $node) { * @see hook_node_access_records() * @see hook_node_grants() * @see hook_node_grants_alter() + * * @ingroup node_access */ function hook_node_access_records_alter(&$grants, Drupal\node\Node $node) { @@ -341,23 +343,22 @@ function hook_node_access_records_alter(&$grants, Drupal\node\Node $node) { } /** - * Alter user access rules when trying to view, edit or delete a node. + * Alters the user access rules when trying to view, edit or delete a node. * * Node access modules establish rules for user access to content. - * hook_node_grants() defines permissions for a user to view, edit or - * delete nodes by building a $grants array that indicates the permissions - * assigned to the user by each node access module. This hook is called to allow - * modules to modify the $grants array by reference, so the interaction of - * multiple node access modules can be altered or advanced business logic can be - * applied. + * hook_node_grants() defines permissions for a user to view, edit or delete + * nodes by building a $grants array that indicates the permissions assigned to + * the user by each node access module. This hook is called to allow modules to + * modify the $grants array by reference, so the interaction of multiple node + * access modules can be altered or advanced business logic can be applied. * * The resulting grants are then checked against the records stored in the * {node_access} table to determine if the operation may be completed. * * A module may deny all access to a user by setting $grants to an empty array. * - * Developers may use this hook to either add additional grants to a user - * or to remove existing grants. These rules are typically based on either the + * Developers may use this hook to either add additional grants to a user or to + * remove existing grants. These rules are typically based on either the * permissions assigned to a user role, or specific attributes of a user * account. * @@ -368,9 +369,10 @@ function hook_node_access_records_alter(&$grants, Drupal\node\Node $node) { * @param $op * The operation being performed, 'view', 'update' or 'delete'. * - * @see hook_node_grants() * @see hook_node_access_records() * @see hook_node_access_records_alter() + * @see hook_node_grants() + * * @ingroup node_access */ function hook_node_grants_alter(&$grants, $account, $op) { @@ -393,7 +395,7 @@ function hook_node_grants_alter(&$grants, $account, $op) { } /** - * Add mass node operations. + * Adds mass node operations. * * This hook enables modules to inject custom operations into the mass * operations dropdown found at admin/content, by associating a callback @@ -404,10 +406,10 @@ function hook_node_grants_alter(&$grants, $account, $op) { * @return * An array of operations. Each operation is an associative array that may * contain the following key-value pairs: - * - 'label': Required. The label for the operation, displayed in the dropdown + * - label: (required) The label for the operation, displayed in the dropdown * menu. - * - 'callback': Required. The function to call for the operation. - * - 'callback arguments': Optional. An array of additional arguments to pass + * - callback: (required) The function to call for the operation. + * - callback arguments: (optional) An array of additional arguments to pass * to the callback function. */ function hook_node_operations() { @@ -451,7 +453,7 @@ function hook_node_operations() { } /** - * Act before node deletion. + * Acts before node deletion operation. * * This hook is invoked from node_delete_multiple() after the type-specific * hook_delete() has been invoked, but before hook_entity_predelete() and @@ -461,8 +463,9 @@ function hook_node_operations() { * @param Drupal\node\Node $node * The node that is about to be deleted. * - * @see hook_node_predelete() * @see node_delete_multiple() + * @see hook_node_predelete() + * * @ingroup node_api_hooks */ function hook_node_predelete(Drupal\node\Node $node) { @@ -472,7 +475,7 @@ function hook_node_predelete(Drupal\node\Node $node) { } /** - * Respond to node deletion. + * Responds to node deletion operation. * * This hook is invoked from node_delete_multiple() after field_attach_delete() * has been called and after the node has been removed from the database. @@ -480,8 +483,9 @@ function hook_node_predelete(Drupal\node\Node $node) { * @param Drupal\node\Node $node * The node that has been deleted. * - * @see hook_node_predelete() * @see node_delete_multiple() + * @see hook_node_predelete() + * * @ingroup node_api_hooks */ function hook_node_delete(Drupal\node\Node $node) { @@ -489,7 +493,7 @@ function hook_node_delete(Drupal\node\Node $node) { } /** - * Respond to deletion of a node revision. + * Responds to the deletion of a node revision. * * This hook is invoked from node_revision_delete() after the revision has been * removed from the node_revision table, and before @@ -507,7 +511,7 @@ function hook_node_revision_delete(Drupal\node\Node $node) { } /** - * Respond to creation of a new node. + * Responds to the creation of a new node. * * This hook is invoked from node_save() after the node is inserted into the * node table in the database, after the type-specific hook_insert() is invoked, @@ -528,13 +532,12 @@ function hook_node_insert(Drupal\node\Node $node) { } /** - * Act on arbitrary nodes being loaded from the database. + * Acts on operation of arbitrary nodes being loaded from the database. * - * This hook should be used to add information that is not in the node or - * node revisions table, not to replace information that is in these tables - * (which could interfere with the entity cache). For performance reasons, - * information for all available nodes should be loaded in a single query where - * possible. + * This hook should be used to add information that is not in the node or node + * revisions table, not to replace information that is in these tables (which + * could interfere with the entity cache). For performance reasons, information + * for all available nodes should be loaded in a single query where possible. * * This hook is invoked during node loading, which is handled by entity_load(), * via classes NodeController and Drupal\Core\Entity\DatabaseStorageController. @@ -574,15 +577,15 @@ function hook_node_load($nodes, $types) { * Modules may implement this hook if they want to have a say in whether or not * a given user has access to perform a given operation on a node. * - * The administrative account (user ID #1) always passes any access check, - * so this hook is not called in that case. Users with the "bypass node access" + * The administrative account (user ID #1) always passes any access check, so + * this hook is not called in that case. Users with the "bypass node access" * permission may always view and edit content through the administrative * interface. * - * Note that not all modules will want to influence access on all - * node types. If your module does not want to actively grant or - * block access, return NODE_ACCESS_IGNORE or simply return nothing. - * Blindly returning FALSE will break other node access modules. + * Note that not all modules will want to influence access on all node types. If + * your module does not want to actively grant or block access, return + * NODE_ACCESS_IGNORE or simply return nothing. Blindly returning FALSE will + * break other node access modules. * * Also note that this function isn't called for node listings (e.g., RSS feeds, * the default home page at path 'node', a recent content block, etc.) See @@ -592,11 +595,8 @@ function hook_node_load($nodes, $types) { * Either a node entity or the machine name of the content type on which to * perform the access check. * @param string $op - * The operation to be performed. Possible values: - * - "create" - * - "delete" - * - "update" - * - "view" + * The operation to be performed. Possible values: 'create', 'delete', + * 'update', or 'view'. * @param object $account * The user object to perform the access check operation on. * @param object $langcode @@ -635,9 +635,8 @@ function hook_node_access($node, $op, $account, $langcode) { return NODE_ACCESS_IGNORE; } - /** - * Act on a node object about to be shown on the add/edit form. + * Acts on a node object about to be shown on the add/edit form. * * This hook is invoked from NodeFormController::prepareEntity() after the * type-specific hook_prepare() is invoked. @@ -654,10 +653,10 @@ function hook_node_prepare(Drupal\node\Node $node) { } /** - * Act on a node being displayed as a search result. + * Acts on a node being displayed as a search result. * - * This hook is invoked from node_search_execute(), after node_load() - * and node_view() have been called. + * This hook is invoked from node_search_execute(), after node_load() and + * node_view() have been called. * * @param Drupal\node\Node $node * The node being displayed in a search result. @@ -666,12 +665,12 @@ function hook_node_prepare(Drupal\node\Node $node) { * * @return array * Extra information to be displayed with search result. This information - * should be presented as an associative array. It will be concatenated - * with the post information (last updated, author) in the default search - * result theming. + * should be presented as an associative array. It will be concatenated with + * the post information (last updated, author) in the default search result + * theming. * - * @see template_preprocess_search_result() * @see search-result.tpl.php + * @see template_preprocess_search_result() * * @ingroup node_api_hooks */ @@ -681,7 +680,7 @@ function hook_node_search_result(Drupal\node\Node $node, $langcode) { } /** - * Act on a node being inserted or updated. + * Acts on a node being inserted or updated. * * This hook is invoked from node_save() before the node is saved to the * database. @@ -701,7 +700,7 @@ function hook_node_presave(Drupal\node\Node $node) { } /** - * Respond to updates to a node. + * Responds to updates to a node. * * This hook is invoked from node_save() after the node is updated in the node * table in the database, after the type-specific hook_update() is invoked, and @@ -720,10 +719,10 @@ function hook_node_update(Drupal\node\Node $node) { } /** - * Act on a node being indexed for searching. + * Acts on a node being indexed for searching. * - * This hook is invoked during search indexing, after node_load(), and after - * the result of node_view() is added as $node->rendered to the node object. + * This hook is invoked during search indexing, after node_load(), and after the + * result of node_view() is added as $node->rendered to the node object. * * @param Drupal\node\Node $node * The node being indexed. @@ -745,19 +744,19 @@ function hook_node_update_index(Drupal\node\Node $node, $langcode) { } /** - * Perform node validation before a node is created or updated. + * Performs node validation before a node is created or updated. * * This hook is invoked from NodeFormController::validate(), after a user has - * has finished editing the node and is previewing or submitting it. It is - * invoked at the end of all the standard validation steps, and after the - * type-specific hook_validate() is invoked. + * finished editing the node and is previewing or submitting it. It is invoked + * at the end of all the standard validation steps, and after the type-specific + * hook_validate() is invoked. * * To indicate a validation error, use form_set_error(). * * Note: Changes made to the $node object within your hook implementation will * have no effect. The preferred method to change a node's content is to use - * hook_node_presave() instead. If it is really necessary to change - * the node at the validate stage, you can use form_set_value(). + * hook_node_presave() instead. If it is really necessary to change the node at + * the validate stage, you can use form_set_value(). * * @param Drupal\node\Node $node * The node being validated. @@ -777,7 +776,7 @@ function hook_node_validate(Drupal\node\Node $node, $form, &$form_state) { } /** - * Act on a node after validated form values have been copied to it. + * Acts on a node after validated form values have been copied to it. * * This hook is invoked when a node form is submitted with either the "Save" or * "Preview" button, after form values have been copied to the form state's node @@ -805,7 +804,7 @@ function hook_node_submit(Drupal\node\Node $node, $form, &$form_state) { } /** - * Act on a node that is being assembled before rendering. + * Acts on a node that is being assembled before rendering. * * The module may add elements to $node->content prior to rendering. This hook * will be called after hook_view(). The structure of $node->content is a @@ -823,9 +822,9 @@ function hook_node_submit(Drupal\node\Node $node, $form, &$form_state) { * @param $langcode * The language code used for rendering. * - * @see forum_node_view() * @see comment_node_view() * @see hook_entity_view() + * @see forum_node_view() * * @ingroup node_api_hooks */ @@ -838,7 +837,7 @@ function hook_node_view(Drupal\node\Node $node, $view_mode, $langcode) { } /** - * Alter the results of node_view(). + * Alters the results of node_view(). * * This hook is called after the content has been assembled in a structured * array and may be used for doing processing which requires that the complete @@ -847,16 +846,16 @@ function hook_node_view(Drupal\node\Node $node, $view_mode, $langcode) { * If the module wishes to act on the rendered HTML of the node rather than the * structured content array, it may use this hook to add a #post_render * callback. Alternatively, it could also implement hook_preprocess_HOOK() for - * node.tpl.php. See drupal_render() and theme() documentation respectively - * for details. + * node.tpl.php. See drupal_render() and theme() documentation respectively for + * details. * * @param $build * A renderable array representing the node content. * @param Drupal\node\Node $node * The node being rendered. * - * @see node_view() * @see hook_entity_view_alter() + * @see node_view() * * @ingroup node_api_hooks */ @@ -871,12 +870,12 @@ function hook_node_view_alter(&$build, Drupal\node\Node $node) { } /** - * Define module-provided node types. + * Defines module-provided node types. * * This hook allows a module to define one or more of its own node types. For * example, the forum module uses it to define a forum node-type named "Forum - * topic." The name and attributes of each desired node type are specified in - * an array returned by the hook. + * topic." The name and attributes of each desired node type are specified in an + * array returned by the hook. * * Only module-provided node types should be defined through this hook. User- * provided (or 'custom') node types should be defined only in the 'node_type' @@ -888,22 +887,21 @@ function hook_node_view_alter(&$build, Drupal\node\Node $node) { * contains a sub-array for each node type, with the the machine name of a * content type as the key. Each sub-array has up to 10 attributes. * Possible attributes: - * - "name": the human-readable name of the node type. Required. - * - "base": the base string used to construct callbacks corresponding to - * this node type. - * (i.e. if base is defined as example_foo, then example_foo_insert will - * be called when inserting a node of that type). This string is usually - * the name of the module, but not always. Required. - * - "description": a brief description of the node type. Required. - * - "help": help information shown to the user when creating a node of - * this type.. Optional (defaults to ''). - * - "has_title": boolean indicating whether or not this node type has a title - * field. Optional (defaults to TRUE). - * - "title_label": the label for the title field of this content type. - * Optional (defaults to 'Title'). - * - "locked": boolean indicating whether the administrator can change the - * machine name of this type. FALSE = changeable (not locked), - * TRUE = unchangeable (locked). Optional (defaults to TRUE). + * - name: (required) The human-readable name of the node type. + * - base: (required) The base string used to construct callbacks + * corresponding to this node type (i.e. if base is defined as example_foo, + * then example_foo_insert will be called when inserting a node of that + * type). This string is usually the name of the module, but not always. + * - description: (required) A brief description of the node type. + * - help: (optional) Help information shown to the user when creating a node + * of this type.. Defaults to an empty string. + * - has_title: (optional) A Boolean indicating whether or not this node type + * has a title field. Defaults to TRUE. + * - title_label: (optional) The label for the title field of this content + * type. Defaults to 'Title'. + * - locked: (optional) A Boolean indicating whether the administrator can + * change the machine name of this type. FALSE = changeable (not locked), + * TRUE = unchangeable (locked). Defaults to TRUE. * * The machine name of a node type should contain only letters, numbers, and * underscores. Underscores will be converted into hyphens for the purpose of @@ -927,7 +925,7 @@ function hook_node_info() { } /** - * Provide additional methods of scoring for core search results for nodes. + * Provides additional methods of scoring for core search results for nodes. * * A node's search score is used to rank it among other nodes matched by the * search, with the highest-ranked nodes appearing first in the search listing. @@ -952,20 +950,20 @@ function hook_node_info() { * corresponding to the internal name of the ranking mechanism, such as * 'recent', or 'comments'. The values should be arrays themselves, with the * following keys available: - * - "title": the human readable name of the ranking mechanism. Required. - * - "join": part of a query string to join to any additional necessary - * table. This is not necessary if the table required is already joined to - * by the base query, such as for the {node} table. Other tables should use - * the full table name as an alias to avoid naming collisions. Optional. - * - "score": part of a query string to calculate the score for the ranking - * mechanism based on values in the database. This does not need to be - * wrapped in parentheses, as it will be done automatically; it also does - * not need to take the weighted system into account, as it will be done - * automatically. It does, however, need to calculate a decimal between + * - title: (required) The human readable name of the ranking mechanism. + * - join: (optional) The part of a query string to join to any additional + * necessary table. This is not necessary if the table required is already + * joined to by the base query, such as for the {node} table. Other tables + * should use the full table name as an alias to avoid naming collisions. + * - score: (required) The part of a query string to calculate the score for + * the ranking mechanism based on values in the database. This does not need + * to be wrapped in parentheses, as it will be done automatically; it also + * does not need to take the weighted system into account, as it will be + * done automatically. It does, however, need to calculate a decimal between * 0 and 1; be careful not to cast the entire score to an integer by - * inadvertently introducing a variable argument. Required. - * - "arguments": if any arguments are required for the score, they can be - * specified in an array here. + * inadvertently introducing a variable argument. + * - arguments: (optional) If any arguments are required for the score, they + * can be specified in an array here. * * @ingroup node_api_hooks */ @@ -990,10 +988,10 @@ function hook_ranking() { /** - * Respond to node type creation. + * Responds to node type creation. * - * This hook is invoked from node_type_save() after the node type is added - * to the database. + * This hook is invoked from node_type_save() after the node type is added to + * the database. * * @param $info * The node type object that is being created. @@ -1003,10 +1001,10 @@ function hook_node_type_insert($info) { } /** - * Respond to node type updates. + * Responds to node type updates. * - * This hook is invoked from node_type_save() after the node type is updated - * in the database. + * This hook is invoked from node_type_save() after the node type is updated in + * the database. * * @param $info * The node type object that is being updated. @@ -1020,7 +1018,7 @@ function hook_node_type_update($info) { } /** - * Respond to node type deletion. + * Responds to node type deletion. * * This hook is invoked from node_type_delete() after the node type is removed * from the database. @@ -1033,7 +1031,7 @@ function hook_node_type_delete($info) { } /** - * Respond to node deletion. + * Responds to node deletion. * * This hook is invoked only on the module that defines the node's content type * (use hook_node_delete() to respond to all node deletions). @@ -1054,7 +1052,7 @@ function hook_delete(Drupal\node\Node $node) { } /** - * Act on a node object about to be shown on the add/edit form. + * Acts on a node object about to be shown on the add/edit form. * * This hook is invoked only on the module that defines the node's content type * (use hook_node_prepare() to act on all node preparations). @@ -1141,7 +1139,7 @@ function hook_form(Drupal\node\Node $node, &$form_state) { } /** - * Respond to creation of a new node. + * Responds to the creation of a new node. * * This hook is invoked only on the module that defines the node's content type * (use hook_node_insert() to act on all node insertions). @@ -1165,7 +1163,7 @@ function hook_insert(Drupal\node\Node $node) { } /** - * Act on nodes being loaded from the database. + * Acts on nodes being loaded from the database. * * This hook is invoked only on the module that defines the node's content type * (use hook_node_load() to respond to all node loads). @@ -1199,7 +1197,7 @@ function hook_load($nodes) { } /** - * Respond to updates to a node. + * Responds to updates to a node. * * This hook is invoked only on the module that defines the node's content type * (use hook_node_update() to act on all node updates). @@ -1221,7 +1219,7 @@ function hook_update(Drupal\node\Node $node) { } /** - * Perform node validation before a node is created or updated. + * Performs node validation before a node is created or updated. * * This hook is invoked only on the module that defines the node's content type * (use hook_node_validate() to act on all node validations). @@ -1255,14 +1253,14 @@ function hook_validate(Drupal\node\Node $node, $form, &$form_state) { } /** - * Display a node. + * Displays a node. * * This hook is invoked only on the module that defines the node's content type * (use hook_node_view() to act on all node views). * - * This hook is invoked during node viewing after the node is fully loaded, - * so that the node type module can define a custom method for display, or - * add to the default display. + * This hook is invoked during node viewing after the node is fully loaded, so + * that the node type module can define a custom method for display, or add to + * the default display. * * @param Drupal\node\Node $node * The node to be displayed, as returned by node_load(). @@ -1270,16 +1268,15 @@ function hook_validate(Drupal\node\Node $node, $form, &$form_state) { * View mode, e.g. 'full', 'teaser', ... * * @return - * The passed $node parameter should be modified as necessary and - * returned so it can be properly presented. Nodes are prepared for display - * by assembling a structured array, formatted as in the Form API, in - * $node->content. As with Form API arrays, the #weight property can be - * used to control the relative positions of added elements. After this - * hook is invoked, node_view() calls field_attach_view() to add field - * views to $node->content, and then invokes hook_node_view() and - * hook_node_view_alter(), so if you want to affect the final - * view of the node, you might consider implementing one of these hooks - * instead. + * The passed $node parameter should be modified as necessary and returned so + * it can be properly presented. Nodes are prepared for display by assembling + * a structured array, formatted as in the Form API, in $node->content. As + * with Form API arrays, the #weight property can be used to control the + * relative positions of added elements. After this hook is invoked, + * node_view() calls field_attach_view() to add field views to $node->content, + * and then invokes hook_node_view() and hook_node_view_alter(), so if you + * want to affect the final view of the node, you might consider implementing + * one of these hooks instead. * * @ingroup node_api_hooks */ diff --git a/core/modules/node/node.install b/core/modules/node/node.install index ac777f3..6625979 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -544,7 +544,7 @@ function node_update_8001() { } /** - * Rename node.language field to node.langcode. + * Rename name of node.language field to node.langcode. */ function node_update_8002() { $spec = array( diff --git a/core/modules/node/node.js b/core/modules/node/node.js index 0899d3c..a445d77 100644 --- a/core/modules/node/node.js +++ b/core/modules/node/node.js @@ -1,3 +1,8 @@ +/** + * @file + * Defines Javascript behaviors for the node module. + */ + (function ($) { "use strict"; diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 2dd1b57..a9f3376 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -14,10 +14,10 @@ use Drupal\Core\Database\Query\AlterableInterface; use Drupal\Core\Database\Query\SelectExtender; use Drupal\Core\Database\Query\SelectInterface; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Template\Attribute; -use Drupal\node\Node; use Drupal\file\File; -use Drupal\Core\Entity\EntityInterface; +use Drupal\node\Node; /** * Denotes that the node is not published. @@ -289,7 +289,7 @@ function node_field_display_node_alter(&$display, $context) { * A node entity. * * @return array - * An array with 'path' as the key and Node ID as its value. + * An array with 'path' as the key and the path to the node as its value. */ function node_uri(Node $node) { return array( @@ -324,7 +324,7 @@ function node_admin_paths() { * field is available, a title attribute will be added to show the number of * comments. * @param $title - * (optional) A heading for the resulting list. + * (optional) A heading for the resulting list. Defaults to NULL. * * @return * A renderable array containing a list of linked node titles fetched from @@ -524,6 +524,8 @@ function node_type_get_description($node_type) { * node_type_save(), and obsolete ones are deleted via a call to * node_type_delete(). See _node_types_build() for an explanation of the new * and obsolete types. + + * @see _node_types_build() */ function node_types_rebuild() { _node_types_build(TRUE); @@ -631,7 +633,7 @@ function node_type_save($info) { * @param $type * A node type object. * @param $label - * (optional) The label for the body instance. + * (optional) The label for the body instance. Defaults to 'Body'. * * @return * Body field instance. @@ -712,7 +714,7 @@ function node_field_extra_fields() { } /** - * Get the default language for a node type. + * Gets the default language for a node type. * * @param string $node_type * The type of node. @@ -907,7 +909,8 @@ function node_type_cache_reset() { * * @param $info * (optional) An object or array containing values to override the defaults. - * See hook_node_info() for details on what the array elements mean. + * See hook_node_info() for details on what the array elements mean. Defaults + * to an empty array. * * @return * A node type object, with missing values in $info set to their defaults. @@ -1031,8 +1034,8 @@ function node_invoke($node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) { * Loads node entities from the database. * * This function should be used whenever you need to load more than one node - * from the database. Nodes are loaded into memory and will not require - * database access if loaded again during the same page request. + * from the database. Nodes are loaded into memory and will not require database + * access if loaded again during the same page request. * * @param array $nids * (optional) An array of entity IDs. If omitted, all entities are loaded. @@ -1140,8 +1143,8 @@ function node_delete($nid) { * @param $nids * An array of node IDs. * - * @see hook_node_predelete() * @see hook_node_delete() + * @see hook_node_predelete() */ function node_delete_multiple($nids) { entity_delete_multiple('node', $nids); @@ -1246,8 +1249,8 @@ function node_view(Node $node, $view_mode = 'full', $langcode = NULL) { * @param $view_mode * (optional) View mode, e.g., 'full', 'teaser'... Defaults to 'full.' * @param $langcode - * (optional) A language code to use for rendering. Defaults to the global - * content language of the current request. + * (optional) A language code to use for rendering. Defaults to NULL, which is + * the global content language of the current request. */ function node_build_content(Node $node, $view_mode = 'full', $langcode = NULL) { if (!isset($langcode)) { @@ -1372,17 +1375,17 @@ function node_preprocess_block(&$variables) { } /** - * Processes variables for node.tpl.php. + * Returns HTML for node.tpl.php. * * Most themes utilize their own copy of node.tpl.php. The default is located * inside "modules/node/node.tpl.php". Look in there for the full list of * variables. * * @param $variables - * An array containing the following arguments: - * - $node - * - $view_mode - * - $page + * An associative array containing: + * - elements: An array of elements to display in view mode. + * - node: A node object. + * - view_mode: View mode, e.g., 'full', 'teaser'... * * @see node.tpl.php */ @@ -1758,6 +1761,7 @@ function node_user_predelete($account) { * - form: A render element representing the form. * * @see node_search_admin() + * * @ingroup themeable */ function theme_node_search_admin($variables) { @@ -1859,7 +1863,7 @@ function _node_revision_access(Node $node, $op = 'view', $account = NULL, $langc * Access callback: Checks whether the user has permission to add a node. * * @return - * TRUE if the user has permission, otherwise FALSE. + * TRUE if the user has add permission, otherwise FALSE. * * @see node_menu() */ @@ -2211,8 +2215,8 @@ function node_block_save($delta = '', $edit = array()) { * (optional) The maximum number of nodes to find. Defaults to 10. * * @return - * An array of node entities or an empty array if there are no recent - * nodes visible to the current user. + * An array of node entities or an empty array if there are no recent nodes + * visible to the current user. */ function node_get_recent($number = 10) { $query = db_select('node', 'n'); @@ -2473,7 +2477,7 @@ function node_block_list_alter(&$blocks) { * and other keys, to be parsed by format_rss_channel() and * format_xml_elements(). A list of channel elements can be found at the * @link http://cyber.law.harvard.edu/rss/rss.html RSS 2.0 Specification. @endlink - * The link should be an absolute URL. + * The link should be an absolute URL. Defaults to an empty array. * * @return Symfony\Component\HttpFoundation\Response * A response object. @@ -2560,9 +2564,10 @@ function node_feed($nids = FALSE, $channel = array()) { * (optional) View mode, e.g., 'full', 'teaser'... Defaults to 'teaser.' * @param $weight * (optional) Integer representing the weight of the first node in the list. + * Defaults to zero. * @param $langcode - * (optional) A language code to use for rendering. Defaults to the global - * content language of the current request. + * (optional) A language code to use for rendering. Defaults to NULL which is + * the global content language of the current request. * * @return * An array in the format expected by drupal_render(). @@ -2844,9 +2849,9 @@ function node_search_validate($form, &$form_state) { * Alters System module's site information settings form to add a global default * setting for number of posts to show on node listing pages. * + * @see node_form_system_site_information_settings_form_submit() * @see node_page_default() * @see taxonomy_term_page() - * @see node_form_system_site_information_settings_form_submit() */ function node_form_system_site_information_settings_form_alter(&$form, &$form_state, $form_id) { $form['front_page']['default_nodes_main'] = array( @@ -2899,8 +2904,8 @@ function node_form_system_themes_admin_form_submit($form, &$form_state) { * @{ * The node access system determines who can do what to which nodes. * - * In determining access rights for a node, node_access() first checks - * whether the user has the "bypass node access" permission. Such users have + * In determining access rights for a node, node_access() first checks whether + * the user has the "bypass node access" permission. Such users have * unrestricted access to all nodes. user 1 will always pass this check. * * Next, all implementations of hook_node_access() will be called. Each @@ -2915,8 +2920,8 @@ function node_form_system_themes_admin_form_submit($form, &$form_state) { * is compared against the table. If any row contains the node ID in question * (or 0, which stands for "all nodes"), one of the grant IDs returned, and a * value of TRUE for the operation in question, then access is granted. Note - * that this table is a list of grants; any matching row is sufficient to - * grant access to the node. + * that this table is a list of grants; any matching row is sufficient to grant + * access to the node. * * In node listings (lists of nodes generated from a select query, such as the * default home page at path 'node', an RSS feed, a recent content block, etc.), @@ -2941,11 +2946,8 @@ function node_form_system_themes_admin_form_submit($form, &$form_state) { * Access callback: Checks a user's permission for performing a node operation. * * @param $op - * The operation to be performed on the node. Possible values are: - * - "view" - * - "update" - * - "delete" - * - "create" + * The operation to be performed on the node. Possible values are: 'view', + * 'update', 'delete', and 'create'. * @param Drupal\node\Node|string|stdClass $node * The node entity on which the operation is to be performed, or the node type * object, or node type string (e.g., 'forum') for the 'create' operation. @@ -3134,11 +3136,11 @@ function node_list_permissions($type) { * * By default, this will include all node types in the system. To exclude a * specific node from getting permissions defined for it, set the - * node_permissions_$type variable to 0. Core does not provide an interface - * for doing so, however, contrib modules may exclude their own nodes in + * node_permissions_$type variable to 0. Core does not provide an interface for + * doing so. However, contrib modules may exclude their own nodes in * hook_install(). Alternatively, contrib modules may configure all node types - * at once, or decide to apply some other hook_node_access() implementation - * to some or all node types. + * at once, or decide to apply some other hook_node_access() implementation to + * some or all node types. * * @return * An array of node types managed by this module. @@ -3157,12 +3159,12 @@ function node_permissions_get_configured_types() { * Fetches an array of permission IDs granted to the given user ID. * * The implementation here provides only the universal "all" grant. A node - * access module should implement hook_node_grants() to provide a grant - * list for the user. + * access module should implement hook_node_grants() to provide a grant list for + * the user. * - * After the default grants have been loaded, we allow modules to alter - * the grants array by reference. This hook allows for complex business - * logic to be applied when integrating multiple node access modules. + * After the default grants have been loaded, we allow modules to alter the + * grants array by reference. This hook allows for complex business logic to be + * applied when integrating multiple node access modules. * * @param $op * The operation that the user is trying to perform. @@ -3197,7 +3199,7 @@ function node_access_grants($op, $account = NULL) { * such a global 'view' access grant. * * This function is called when a node listing query is tagged with - * 'node_access'; when this function returns TRUE, no node access joins are + 'node_access'; when this function returns TRUE, no node access joins are * added to the query. * * @param $account @@ -3257,11 +3259,10 @@ function node_access_view_all_nodes($account = NULL) { /** * Implements hook_query_TAG_alter(). * - * This is the hook_query_alter() for queries tagged with 'node_access'. - * It adds node access checks for the user account given by the 'account' - * meta-data (or global $user if not provided), for an operation given by - * the 'op' meta-data (or 'view' if not provided; other possible values are - * 'update' and 'delete'). + * This is the hook_query_alter() for queries tagged with 'node_access'. It adds + * node access checks for the user account given by the 'account' meta-data (or + * global $user if not provided), for an operation given by the 'op' meta-data + * (or 'view' if not provided; other possible values are 'update' and 'delete'). */ function node_query_node_access_alter(AlterableInterface $query) { _node_query_node_access_alter($query, 'node'); @@ -3279,7 +3280,7 @@ function node_query_entity_field_access_alter(AlterableInterface $query) { } /** - * Helper for node access functions. + * Helper function for node_access functions. * * @param $query * The query to add conditions to. @@ -3288,8 +3289,8 @@ function node_query_entity_field_access_alter(AlterableInterface $query) { * node_query_node_access_alter() and node_query_entity_field_access_alter() * for more. * - * @see node_query_node_access_alter() * @see node_query_entity_field_access_alter() + * @see node_query_node_access_alter() */ function _node_query_node_access_alter($query, $type) { global $user; @@ -3452,7 +3453,7 @@ function node_access_acquire_grants(Node $node, $delete = TRUE) { * * If a realm is provided, it will only delete grants from that realm, but it * will always delete a grant from the 'all' realm. Modules that utilize - * node_access can use this function when doing mass updates due to widespread + * node_access() can use this function when doing mass updates due to widespread * permission changes. * * Note: Don't call this function directly from a contributed module. Call @@ -3460,7 +3461,7 @@ function node_access_acquire_grants(Node $node, $delete = TRUE) { * * @param Drupal\node\Node $node * The $node being written to. All that is necessary is that it contains a - * nid. + * nid member. * @param $grants * A list of grants to write. Each grant is an array that must contain the * following keys: realm, gid, grant_view, grant_update, grant_delete. @@ -3474,6 +3475,8 @@ function node_access_acquire_grants(Node $node, $delete = TRUE) { * (optional) If false, does not delete records. This is only for optimization * purposes, and assumes the caller has already performed a mass delete of * some form. Defaults to TRUE. + * + * @see node_access_acquire_grants() */ function _node_access_write_grants(Node $node, $grants, $realm = NULL, $delete = TRUE) { if ($delete) { @@ -3509,7 +3512,8 @@ function _node_access_write_grants(Node $node, $grants, $realm = NULL, $delete = * This can be used as an alternative to direct node_access_rebuild calls, * allowing administrators to decide when they want to perform the actual * (possibly time consuming) rebuild. - * When unsure the current user is an administrator, node_access_rebuild + * + * When unsure if the current user is an administrator, node_access_rebuild() * should be used instead. * * @param $rebuild @@ -3517,6 +3521,8 @@ function _node_access_write_grants(Node $node, $grants, $realm = NULL, $delete = * * @return * The current value of the flag if no value was provided for $rebuild. + * + * @see node_access_rebuild() */ function node_access_needs_rebuild($rebuild = NULL) { if (!isset($rebuild)) { @@ -3551,6 +3557,8 @@ function node_access_needs_rebuild($rebuild = NULL) { * non-batch mode. Defaults to FALSE. * * @see node_access_needs_rebuild() + * + * @ingroup batch */ function node_access_rebuild($batch_mode = FALSE) { db_delete('node_access')->execute(); @@ -3604,11 +3612,11 @@ function node_access_rebuild($batch_mode = FALSE) { } /** - * Batch operation for node_access_rebuild_batch. + * Performs batch operation for node_access_rebuild(). * - * This is a multistep operation : we go through all nodes by packs of 20. - * The batch processing engine interrupts processing and sends progress - * feedback after 1 second execution time. + * This is a multistep operation: we go through all nodes by packs of 20. The + * batch processing engine interrupts processing and sends progress feedback + * after 1 second execution time. * * @param array $context * An array of contextual key/value information for rebuild batch process. @@ -3642,7 +3650,7 @@ function _node_access_rebuild_batch_operation(&$context) { } /** - * Post-processing for node_access_rebuild_batch. + * Performs post-processing for node_access_rebuild(). * * @param bool $success * A boolean indicating whether the re-build process has completed. @@ -3776,7 +3784,7 @@ function node_action_info() { * A node entity. * @param $context * (optional) Array of additional information about what triggered the action. - * Not used for this action. + * Not used for this action. Defaults to an empty array. * * @ingroup actions */ @@ -3792,7 +3800,7 @@ function node_publish_action(Node $node, $context = array()) { * A node entity. * @param $context * (optional) Array of additional information about what triggered the action. - * Not used for this action. + * Not used for this action. Defaults to an empty array. * * @ingroup actions */ @@ -3808,7 +3816,7 @@ function node_unpublish_action(Node $node, $context = array()) { * A node entity. * @param $context * (optional) Array of additional information about what triggered the action. - * Not used for this action. + * Not used for this action. Defaults to an empty array. * * @ingroup actions */ @@ -3824,7 +3832,7 @@ function node_make_sticky_action(Node $node, $context = array()) { * A node entity. * @param $context * (optional) Array of additional information about what triggered the action. - * Not used for this action. + * Not used for this action. Defaults to an empty array. * * @ingroup actions */ @@ -3856,7 +3864,7 @@ function node_promote_action(Node $node, $context = array()) { * A node entity. * @param $context * (optional) Array of additional information about what triggered the action. - * Not used for this action. + * Not used for this action. Defaults to an empty array. * * @ingroup actions */ @@ -3891,6 +3899,7 @@ function node_save_action(Node $node) { * @see node_assign_owner_action_form() * @see node_assign_owner_action_validate() * @see node_assign_owner_action_submit() + * * @ingroup actions */ function node_assign_owner_action(Node $node, $context) { @@ -3907,8 +3916,9 @@ function node_assign_owner_action(Node $node, $context) { * the following elements: * - owner_uid: User ID to assign to the node. * - * @see node_assign_owner_action_submit() * @see node_assign_owner_action_validate() + * @see node_assign_owner_action_submit() + * * @ingroup forms */ function node_assign_owner_action_form($context) { @@ -3979,6 +3989,8 @@ function node_assign_owner_action_submit($form, $form_state) { * * @return array * A form array. + * + * @see node_unpublish_by_keyword_action_submit() */ function node_unpublish_by_keyword_action_form($context) { $form['keywords'] = array( diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc index 1780fb9..ff6f4a5 100644 --- a/core/modules/node/node.pages.inc +++ b/core/modules/node/node.pages.inc @@ -62,9 +62,6 @@ function node_add_page() { * An associative array containing: * - content: An array of content types. * - * @return string - * An HTML-formatted string. - * * @see node_add_page() * * @ingroup themeable @@ -170,6 +167,7 @@ function node_preview(Node $node) { * - node: The node entity which is being previewed. * * @see NodeFormController::preview() + * @see node_preview() * * @ingroup themeable */ @@ -209,6 +207,7 @@ function theme_node_preview($variables) { * @return array * A form array. * + * @see node_delete_confirm_submit() * @see node_menu() */ function node_delete_confirm($form, &$form_state, $node) { @@ -312,6 +311,8 @@ function node_revision_overview($node) { * * @see node_menu() * @see node_revision_revert_confirm_submit() + * + * @ingroup forms */ function node_revision_revert_confirm($form, $form_state, $node_revision) { $form['#node_revision'] = $node_revision; @@ -353,6 +354,8 @@ function node_revision_revert_confirm_submit($form, &$form_state) { * * @see node_menu() * @see node_revision_delete_confirm_submit() + * + * @ingroup forms */ function node_revision_delete_confirm($form, $form_state, $node_revision) { $form['#node_revision'] = $node_revision; diff --git a/core/modules/node/tests/modules/node_access_test/node_access_test.module b/core/modules/node/tests/modules/node_access_test/node_access_test.module index a503217..3e6b281 100644 --- a/core/modules/node/tests/modules/node_access_test/node_access_test.module +++ b/core/modules/node/tests/modules/node_access_test/node_access_test.module @@ -2,13 +2,14 @@ /** * @file - * Dummy module implementing node access related hooks to test API interaction + * A dummy module implementing node access related hooks for testing purposes. + * + * A summy module implementing node access related hooks to test API interaction * with the Node module. This module restricts view permission to those with * a special 'node test view' permission. */ use Drupal\Core\Entity\EntityFieldQuery; - use Drupal\node\Node; /** diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module index 1686ff0..4f2ac75 100644 --- a/core/modules/node/tests/modules/node_test/node_test.module +++ b/core/modules/node/tests/modules/node_test/node_test.module @@ -2,8 +2,10 @@ /** * @file - * Dummy module implementing node related hooks to test API interaction with - * the Node module. + * A dummy module for testing node related hooks. + * + * This is a dummy module that implements node related hooks to test API + * interaction with the Node module. */ use Drupal\node\Node; diff --git a/core/modules/node/tests/modules/node_test_exception/node_test_exception.module b/core/modules/node/tests/modules/node_test_exception/node_test_exception.module index 570236b..5f27259 100644 --- a/core/modules/node/tests/modules/node_test_exception/node_test_exception.module +++ b/core/modules/node/tests/modules/node_test_exception/node_test_exception.module @@ -2,8 +2,7 @@ /** * @file - * Dummy module implementing node related hooks to test API interaction with - * the Node module. + * A module implementing node related hooks to test API interaction. */ use Drupal\node\Node;