function auto_nodetitle_is_needed in Automatic Nodetitles 8
Same name and namespace in other branches
- 5 auto_nodetitle.module \auto_nodetitle_is_needed()
- 6 auto_nodetitle.module \auto_nodetitle_is_needed()
- 7 auto_nodetitle.module \auto_nodetitle_is_needed()
Returns whether the auto nodetitle has to be set.
2 calls to auto_nodetitle_is_needed()
- auto_nodetitle_node_presave in ./
auto_nodetitle.module - Implements hook_ENTITY_TYPE_presave().
- auto_nodetitle_operations_update in ./
auto_nodetitle.module - Callback function for updating node titles.
File
- ./
auto_nodetitle.module, line 73 - Allows hiding of the node title field and automatic title creation.
Code
function auto_nodetitle_is_needed($node) {
return empty($node->auto_nodetitle_applied) && ($setting = auto_nodetitle_get_setting($node
->getType())) && !($setting == AUTO_NODETITLE_OPTIONAL && !empty($node->title));
}