public function SimpleSitemapListBuilder::buildForm in Simple XML sitemap 4.x
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides DraggableListBuilder::buildForm
File
- src/
SimpleSitemapListBuilder.php, line 81
Class
- SimpleSitemapListBuilder
- Class SimpleSitemapListBuilder
Namespace
Drupal\simple_sitemapCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$form = \Drupal::formBuilder()
->getForm(StatusForm::class) + $form;
$form['entities']['#empty'] = $this
->t('No sitemaps have been defined yet. <a href="@url">Add a new one</a>.', [
'@url' => Url::fromRoute('simple_sitemap.add')
->toString(),
]);
$form['#prefix'] = FormHelper::getDonationText();
return $form;
}