function node_test_node_build_defaults_alter
Same name in other branches
- 9 core/modules/node/tests/modules/node_test/node_test.module \node_test_node_build_defaults_alter()
- 10 core/modules/node/tests/modules/node_test/node_test.module \node_test_node_build_defaults_alter()
- 11.x core/modules/node/tests/modules/node_test/node_test.module \node_test_node_build_defaults_alter()
Implements hook_ENTITY_TYPE_build_defaults_alter() for node entities.
File
-
core/
modules/ node/ tests/ modules/ node_test/ node_test.module, line 46
Code
function node_test_node_build_defaults_alter(array &$build, NodeInterface &$node, $view_mode = 'full') {
if ($view_mode == 'rss') {
$node->rss_namespaces['xmlns:drupaltest'] = 'http://example.com/test-namespace';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.