Last active
February 26, 2020 10:14
-
-
Save akiyamaSM/b38541da42cd7880546c92adefbe2462 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Drupal\JobApplication\Form; | |
| use Drupal\Core\Form\FormBase; | |
| use Drupal\Core\Form\FormStateInterface; | |
| class ApplyForm extends FormBase | |
| { | |
| /** | |
| * @inheritDoc | |
| */ | |
| public function getFormId() | |
| { | |
| return 'jobapplication_settings'; | |
| } | |
| /** | |
| * @inheritDoc | |
| */ | |
| public function buildForm(array $form, FormStateInterface $form_state, $reference = null) | |
| { | |
| $form['reference'] = [ | |
| '#type' => 'textfield', | |
| '#title' => $this->t('Example reference'), | |
| '#value' => $reference | |
| ]; | |
| $form['submit'] = [ | |
| '#type' => 'submit', | |
| '#value' => $this->t('Submit'), | |
| ]; | |
| return $form; | |
| } | |
| /** | |
| * @inheritDoc | |
| */ | |
| public function submitForm(array &$form, FormStateInterface $form_state) | |
| { | |
| die('sss'); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| job_application: | |
| path: /jobs | |
| defaults: | |
| _controller: Drupal\JobApplication\Controller\JobsController::index | |
| requirements: | |
| _permission: 'access content' | |
| job_application_apply: | |
| path: /jobs/apply/{reference} | |
| defaults: | |
| _controller: Drupal\JobApplication\Controller\JobsController::show | |
| methods: [GET] | |
| requirements: | |
| _permission: 'access content' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment