summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/NodeForm.php
diff options
context:
space:
mode:
authorNathaniel Catchpole2015-02-05 15:25:41 (GMT)
committerNathaniel Catchpole2015-02-05 15:31:02 (GMT)
commit824fef8a2c6963fe03444be3197caa502ddfdcd2 (patch)
treec4055f72f68bfabd7640e89e9c399e45c0753204 /core/modules/node/src/NodeForm.php
parent58bd271b5c6b5d1a96029cd5a05593faf80bdc08 (diff)
Issue #2406103 by Berdir, alexpott: Remove hook_node_validate() and hook_node_submit() because they bypass the entity API
Diffstat (limited to 'core/modules/node/src/NodeForm.php')
-rw-r--r--core/modules/node/src/NodeForm.php14
1 files changed, 0 insertions, 14 deletions
diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php
index fb8daa9..fda9fdb 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -293,14 +293,6 @@ class NodeForm extends ContentEntityForm {
$form_state->setErrorByName('changed', $this->t('The content on this page has either been modified by another user, or you have already submitted modifications using this form. As a result, your changes cannot be saved.'));
}
- // Invoke hook_node_validate() for validation needed by modules.
- // Can't use \Drupal::moduleHandler()->invokeAll(), because $form_state must
- // be receivable by reference.
- foreach (\Drupal::moduleHandler()->getImplementations('node_validate') as $module) {
- $function = $module . '_node_validate';
- $function($node, $form, $form_state);
- }
-
parent::validate($form, $form_state);
}
@@ -328,12 +320,6 @@ class NodeForm extends ContentEntityForm {
else {
$node->setNewRevision(FALSE);
}
-
- $node->validated = TRUE;
- foreach (\Drupal::moduleHandler()->getImplementations('node_submit') as $module) {
- $function = $module . '_node_submit';
- $function($node, $form, $form_state);
- }
}
/**