node_type_get_names

node_type_get_names() Returns a list of available node type names. This list can include types that are queued for addition or deletion. Return value string[] An array of node type labels, keyed by the node type name. File core/modules/node/node.module, line 259 The core module that allows content to be submitted to the site. Code function node_type_get_names() { return array_map(function($bundle_info) { return $bundle_info['label']; }, \Drupal::entityManager()->getBundleInfo('nod

node_type_get_description

node_type_get_description(NodeTypeInterface $node_type) Description callback: Returns the node type description. Parameters \Drupal\node\NodeTypeInterface $node_type: The node type object. Return value string The node type description. File core/modules/node/node.module, line 291 The core module that allows content to be submitted to the site. Code function node_type_get_description(NodeTypeInterface $node_type) { return $node_type->getDescription(); }

node_token_info

node_token_info() Implements hook_token_info(). File core/modules/node/node.tokens.inc, line 16 Builds placeholder replacement tokens for node-related data. Code function node_token_info() { $type = array( 'name' => t('Nodes'), 'description' => t('Tokens related to individual content items, or "nodes".'), 'needs-data' => 'node', ); // Core tokens for nodes. $node['nid'] = array( 'name' => t("Content ID"), 'description' => t('The unique ID of the con

node_tokens

node_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) Implements hook_tokens(). File core/modules/node/node.tokens.inc, line 87 Builds placeholder replacement tokens for node-related data. Code function node_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { $token_service = \Drupal::token(); $url_options = array('absolute' => TRUE); if (isset($options['langcode'])) { $url_options['language']

node_title_list

node_title_list(StatementInterface $result, $title = NULL) Gathers a listing of links to nodes. Parameters \Drupal\Core\Database\StatementInterface $result: A database result object from a query to fetch node entities. If your query joins the {comment_entity_statistics} table so that the comment_count field is available, a title attribute will be added to show the number of comments. $title: (optional) A heading for the resulting list. Return value array|false A renderable array containing a

node_theme_suggestions_node

node_theme_suggestions_node(array $variables) Implements hook_theme_suggestions_HOOK(). File core/modules/node/node.module, line 542 The core module that allows content to be submitted to the site. Code function node_theme_suggestions_node(array $variables) { $suggestions = array(); $node = $variables['elements']['#node']; $sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_'); $suggestions[] = 'node__' . $sanitized_view_mode; $suggestions[] = 'node__' . $node

node_theme

node_theme() Implements hook_theme(). File core/modules/node/node.module, line 133 The core module that allows content to be submitted to the site. Code function node_theme() { return array( 'node' => array( 'render element' => 'elements', ), 'node_add_list' => array( 'variables' => array('content' => NULL), ), 'node_edit_form' => array( 'render element' => 'form', ), 'field__node__title' => array( 'base hook' =>

NODE_STICKY

Denotes that the node is sticky at the top of the page. File core/modules/node/node.module, line 60 The core module that allows content to be submitted to the site. Code const NODE_STICKY = 1;

node_revision_load

node_revision_load($vid = NULL) Loads a node revision from the database. Parameters int $vid: The node revision id. Return value \Drupal\node\NodeInterface|null A fully-populated node entity, or NULL if the node is not found. File core/modules/node/node.module, line 459 The core module that allows content to be submitted to the site. Code function node_revision_load($vid = NULL) { return entity_revision_load('node', $vid); }

node_revision_delete

node_revision_delete($revision_id) Deletes a node revision. Parameters int $revision_id: The revision ID to delete. File core/modules/node/node.module, line 469 The core module that allows content to be submitted to the site. Code function node_revision_delete($revision_id) { \Drupal::entityTypeManager()->getStorage('node')->deleteRevision($revision_id); }