protected function FormHelper::getFormEntity in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::getFormEntity()
- 4.x src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::getFormEntity()
Gets the object entity of the form if available.
Return value
\Drupal\Core\Entity\Entity|false Entity or FALSE if non-existent or if form operation is 'delete'.
1 call to FormHelper::getFormEntity()
- FormHelper::getEntityDataFromFormEntity in src/
Form/ FormHelper.php - Checks if this particular form is a bundle form, or a bundle instance form and gathers sitemap settings from the database.
File
- src/
Form/ FormHelper.php, line 371
Class
- FormHelper
- Class FormHelper @package Drupal\simple_sitemap\Form
Namespace
Drupal\simple_sitemap\FormCode
protected function getFormEntity() {
$form_object = $this->formState
->getFormObject();
if (NULL !== $form_object && method_exists($form_object, 'getOperation') && method_exists($form_object, 'getEntity') && in_array($form_object
->getOperation(), self::$allowedFormOperations)) {
return $form_object
->getEntity();
}
return FALSE;
}