function faq_ask_edit_submit in FAQ_Ask 8
Custom submit handler for faq node edit.
1 string reference to 'faq_ask_edit_submit'
- faq_ask_form_node_faq_edit_form_alter in ./
faq_ask.module - Implements hook_form_FORM_ID_alter().
File
- ./
faq_ask.module, line 325 - This module is an add-on to FAQ module, allows users to 'ask question'.
Code
function faq_ask_edit_submit($form, FormStateInterface $form_state) {
$node_id = $form_state
->getValue('nid');
$node = node_load($node_id);
if (is_object($node->body) && empty($node->body->value)) {
$node
->set("status", 1);
$node
->save();
}
}