node_get_type_label

node_get_type_label(NodeInterface $node) Returns the node type label for the passed node. @todo Add this as generic helper method for config entities representing entity bundles. Parameters \Drupal\node\NodeInterface $node: A node entity to return the node type's label for. Return value string|false The node type label or FALSE if the node type is not found. File core/modules/node/node.module, line 277 The core module that allows content to be submitted to the site. Code function node_get_t

node_get_recent

node_get_recent($number = 10) Finds the most recently changed nodes that are available to the current user. Parameters $number: (optional) The maximum number of nodes to find. Defaults to 10. Return value \Drupal\node\NodeInterface[] An array of node entities or an empty array if there are no recent nodes visible to the current user. File core/modules/node/node.module, line 734 The core module that allows content to be submitted to the site. Code function node_get_recent($number = 10) { $

node_form_system_themes_admin_form_submit

node_form_system_themes_admin_form_submit($form, FormStateInterface $form_state) Form submission handler for system_themes_admin_form(). See also node_form_system_themes_admin_form_alter() File core/modules/node/node.module, line 843 The core module that allows content to be submitted to the site. Code function node_form_system_themes_admin_form_submit($form, FormStateInterface $form_state) { \Drupal::configFactory()->getEditable('node.settings') ->set('use_admin_theme', $form_st

node_form_system_themes_admin_form_alter

node_form_system_themes_admin_form_alter(&$form, FormStateInterface $form_state, $form_id) Implements hook_form_FORM_ID_alter(). Alters the theme form to use the admin theme on node editing. See also node_form_system_themes_admin_form_submit() File core/modules/node/node.module, line 828 The core module that allows content to be submitted to the site. Code function node_form_system_themes_admin_form_alter(&$form, FormStateInterface $form_state, $form_id) { $form['admin_theme']['use

node_entity_view_display_alter

node_entity_view_display_alter(EntityViewDisplayInterface $display, $context) Implements hook_entity_view_display_alter(). File core/modules/node/node.module, line 159 The core module that allows content to be submitted to the site. Code function node_entity_view_display_alter(EntityViewDisplayInterface $display, $context) { if ($context['entity_type'] == 'node') { // Hide field labels in search index. if ($context['view_mode'] == 'search_index') { foreach ($display->getCom

node_entity_extra_field_info

node_entity_extra_field_info() Implements hook_entity_extra_field_info(). File core/modules/node/node.module, line 369 The core module that allows content to be submitted to the site. Code function node_entity_extra_field_info() { $extra = array(); $description = t('Node module element'); foreach (NodeType::loadMultiple() as $bundle) { $extra['node'][$bundle->id()]['display']['links'] = array( 'label' => t('Links'), 'description' => $description, 'weight'

node_cron

node_cron() Implements hook_cron(). File core/modules/node/node.module, line 620 The core module that allows content to be submitted to the site. Code function node_cron() { // Calculate the oldest and newest node created times, for use in search // rankings. (Note that field aliases have to be variables passed by // reference.) if (\Drupal::moduleHandler()->moduleExists('search')) { $min_alias = 'min_created'; $max_alias = 'max_created'; $result = \Drupal::entityQueryA

node_config_translation_info_alter

node_config_translation_info_alter(&$info) Implements hook_config_translation_info_alter(). File core/modules/node/node.module, line 1367 The core module that allows content to be submitted to the site. Code function node_config_translation_info_alter(&$info) { $info['node_type']['class'] = 'Drupal\node\ConfigTranslation\NodeTypeMapper'; }

node_configurable_language_delete

node_configurable_language_delete(ConfigurableLanguageInterface $language) Implements hook_ENTITY_TYPE_delete() for 'configurable_language'. File core/modules/node/node.module, line 1316 The core module that allows content to be submitted to the site. Code function node_configurable_language_delete(ConfigurableLanguageInterface $language) { // On nodes with this language, unset the language. \Drupal::entityManager()->getStorage('node')->clearRevisionsLanguage($language); }

node_comment_update

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