public function HtaccessConfirmForm::buildForm in Htaccess 8.2
Admin htaccess confirm form
Overrides ConfirmFormBase::buildForm
File
- src/
Form/ HtaccessConfirmForm.php, line 96 - Administration pages.
Class
- HtaccessConfirmForm
- Defines a form to confirm Htaccess deployment or deletion
Namespace
Drupal\htaccess\FormCode
public function buildForm(array $form, FormStateInterface $form_state, Request $request = NULL) {
$path = $request
->getPathInfo();
$parts = explode('/', $path);
$this->action = UCFirst($parts[6]);
$this->id = $parts[7];
$select = Database::getConnection()
->select('htaccess', 'h');
$select
->fields('h');
$select
->condition('id', $this->id);
$results = $select
->execute();
$result = $results
->fetch();
$this->name = $result->name;
return parent::buildForm($form, $form_state);
}