public function Delete::buildForm in SimpleAds 8
Same name in this branch
- 8 src/Form/Groups/Delete.php \Drupal\simpleads\Form\Groups\Delete::buildForm()
- 8 src/Form/Ads/Delete.php \Drupal\simpleads\Form\Ads\Delete::buildForm()
- 8 src/Form/Campaigns/Delete.php \Drupal\simpleads\Form\Campaigns\Delete::buildForm()
Parameters
int $form_id: (optional) The ID of the item to be deleted.
Overrides ConfirmFormBase::buildForm
File
- src/
Form/ Ads/ Delete.php, line 65
Class
- Delete
- Delete advertisement form.
Namespace
Drupal\simpleads\Form\AdsCode
public function buildForm(array $form, FormStateInterface $form_state, $type = NULL, $id = NULL) {
$form['ad_type'] = [
'#type' => 'hidden',
'#value' => $type,
];
$form['id'] = [
'#type' => 'hidden',
'#value' => $id,
];
$this->ad = (new Ads())
->setId($id)
->load();
return parent::buildForm($form, $form_state);
}