node_comment_insert

node_comment_insert($comment) Implements hook_ENTITY_TYPE_insert() for comment entities. File core/modules/node/node.module, line 1337 The core module that allows content to be submitted to the site. Code function node_comment_insert($comment) { // Reindex the node when comments are added. if ($comment->getCommentedEntityTypeId() == 'node') { node_reindex_node_search($comment->getCommentedEntityId()); } }

node_comment_delete

node_comment_delete($comment) Implements hook_ENTITY_TYPE_delete() for comment entities. File core/modules/node/node.module, line 1357 The core module that allows content to be submitted to the site. Code function node_comment_delete($comment) { // Reindex the node when comments are deleted. if ($comment->getCommentedEntityTypeId() == 'node') { node_reindex_node_search($comment->getCommentedEntityId()); } }

node_add_body_field

node_add_body_field(NodeTypeInterface $type, $label = 'Body') Adds the default body field to a node type. Parameters \Drupal\node\NodeTypeInterface $type: A node type object. string $label: (optional) The label for the body instance. Return value \Drupal\field\Entity\FieldConfig A Body field object. File core/modules/node/node.module, line 322 The core module that allows content to be submitted to the site. Code function node_add_body_field(NodeTypeInterface $type, $label = 'Body') { // A

node_access_view_all_nodes

node_access_view_all_nodes($account = NULL) Determines whether the user has a global viewing grant for all nodes. Checks to see whether any module grants global 'view' access to a user account; global 'view' access is encoded in the {node_access} table as a grant with nid=0. If no node access modules are enabled, node.module defines 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 j

node_access_rebuild

node_access_rebuild($batch_mode = FALSE) Rebuilds the node access database. This rebuild is occasionally needed by modules that make system-wide changes to access levels. When the rebuild is required by an admin-triggered action (e.g module settings form), calling node_access_needs_rebuild(TRUE) instead of node_access_rebuild() lets the user perform his changes and actually rebuild only once he is done. Note : As of Drupal 6, node access modules are not required to (and actually should not) cal

node_access_needs_rebuild

node_access_needs_rebuild($rebuild = NULL) Toggles or reads the value of a flag for rebuilding the node access grants. When the flag is set, a message is displayed to users with 'access administration pages' permission, pointing to the 'rebuild' confirm form. 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 if the current user is an administrator, node_acc

node_access_grants

node_access_grants($op, AccountInterface $account) 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. 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. Parameters string

NodeViewsData::getViewsData

public NodeViewsData::getViewsData() Returns views data for the entity type. Return value array Views data in the format of hook_views_data(). Overrides EntityViewsData::getViewsData File core/modules/node/src/NodeViewsData.php, line 15 Class NodeViewsData Provides the views data for the node entity type. Namespace Drupal\node Code public function getViewsData() { $data = parent::getViewsData(); $data['node_field_data']['table']['base']['weight'] = -10; $data['node_field_data']

NodeViewsData

Provides the views data for the node entity type. Hierarchy class \Drupal\views\EntityViewsData implements EntityHandlerInterface, EntityViewsDataInterface uses StringTranslationTraitclass \Drupal\node\NodeViewsData File core/modules/node/src/NodeViewsData.php, line 10 Namespace Drupal\node Members Name Modifiers Type Description EntityViewsData::$entityManager protected property The entity manager. EntityViewsData::$entityType protected property Entity type for

NodeViewController::__construct

public NodeViewController::__construct(EntityManagerInterface $entity_manager, RendererInterface $renderer, AccountInterface $current_user = NULL) Creates an NodeViewController object. Parameters \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager. \Drupal\Core\Render\RendererInterface $renderer: The renderer service. \Drupal\Core\Session\AccountInterface $current_user: The current user. For backwards compatibility this is optional, however this will be removed befor