src/Drupal/functions node.php

Functions

node_load_multiple()

node_load_multiple(array  $nids = [], array  $conditions = [], bool  $reset = false) : mixed

Parameters

array $nids
array $conditions
bool $reset

Returns

mixed —

node_load()

node_load(int|string|null  $nid = null, int|string|null  $vid = null, bool  $reset = false) : mixed

Parameters

int|string|null $nid
int|string|null $vid
bool $reset

Returns

mixed —

node_view()

node_view(mixed  $node, mixed  $view_mode = 'full', mixed  $langcode = null) : mixed

Parameters

mixed $node
mixed $view_mode
mixed $langcode

Returns

mixed —

node_type_get_name()

node_type_get_name(\Drupal\Core\Entity\EntityInterface|string  $node) : string|false

Parameters

\Drupal\Core\Entity\EntityInterface|string $node

Returns

string|false —

node_type_load()

node_type_load(string  $name) : ?\Drupal\node\NodeTypeInterface

Parameters

string $name

Returns

?\Drupal\node\NodeTypeInterface —

node_type_set_defaults()

node_type_set_defaults(array{type?: string, name?: string, base?: string, description?: string, help?: string, custom?: int, modified?: int, locked?: int, disabled?: int, is_new?: int, has_title?: int, title_label?: string}  $info = []) : \Drupal\node\NodeTypeInterface

Parameters

array{type?: string, name?: string, base?: string, description?: string, help?: string, custom?: int, modified?: int, locked?: int, disabled?: int, is_new?: int, has_title?: int, title_label?: string} $info

Returns

\Drupal\node\NodeTypeInterface —

node_type_save()

node_type_save(\Drupal\node\NodeTypeInterface  $info) : int

Parameters

\Drupal\node\NodeTypeInterface $info

Returns

int —

node_type_delete()

node_type_delete(string  $type) : void

Parameters

string $type

Returns

void —

node_types_rebuild()

node_types_rebuild() : void

Creates the node types that enabled modules declare in `hook_node_info()`.

Drupal 7 kept the declared types in a table and added the missing ones here. Drupal 11 has no such hook, so a type is created as a config entity when none of that name exists. Keys with no counterpart (has_title, title_label, has_body, locked) are recorded and not applied.

Returns

void —