protected function FormHelper::supports in Simple XML sitemap 8.3
Same name and namespace in other branches
- 8.2 src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::supports()
- 4.x src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::supports()
Return value
bool
1 call to FormHelper::supports()
- FormHelper::processForm in src/
Form/ FormHelper.php
File
- src/
Form/ FormHelper.php, line 207
Class
- FormHelper
- Class FormHelper @package Drupal\simple_sitemap\Form
Namespace
Drupal\simple_sitemap\FormCode
protected function supports() {
// Do not alter the form if it is irrelevant to sitemap generation.
if (empty($this
->getEntityCategory())) {
return FALSE;
}
// Do not alter the form if user lacks certain permissions.
if (!$this->currentUser
->hasPermission('administer sitemap settings')) {
return FALSE;
}
// Do not alter the form if entity is not enabled in sitemap settings.
if (!$this->generator
->entityTypeIsEnabled($this
->getEntityTypeId())) {
return FALSE;
}
return TRUE;
}