public function FeedImporterFormBase::form in Feed Import 8
Gets the actual form array to be built.
Overrides EntityForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
2 calls to FeedImporterFormBase::form()
- FeedImporterAddForm::form in src/
Form/ FeedImporterAddForm.php - Gets the actual form array to be built.
- FeedImporterEditForm::form in src/
Form/ FeedImporterEditForm.php - Gets the actual form array to be built.
2 methods override FeedImporterFormBase::form()
- FeedImporterAddForm::form in src/
Form/ FeedImporterAddForm.php - Gets the actual form array to be built.
- FeedImporterEditForm::form in src/
Form/ FeedImporterEditForm.php - Gets the actual form array to be built.
File
- src/
Form/ FeedImporterFormBase.php, line 44
Class
- FeedImporterFormBase
- Form for adding a feed importer.
Namespace
Drupal\feed_import\FormCode
public function form(array $form, FormStateInterface $form_state) {
$form['label'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Feed Importer name'),
'#default_value' => $this->entity
->label(),
'#required' => TRUE,
);
$form['id'] = array(
'#type' => 'machine_name',
'#machine_name' => array(
'exists' => array(
$this->feedImporterStorage,
'load',
),
),
'#default_value' => $this->entity
->id(),
'#required' => TRUE,
);
return parent::form($form, $form_state);
}