Skip to content
Snippets Groups Projects

ISTWCMS-6822: Adding links and tasks.

5 files
+ 111
5
Compare changes
  • Side-by-side
  • Inline
Files
5
<?php
namespace Drupal\uw_kuali\Form;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Represents a form used for archiving data in the UwKuali application.
*
* This class extends the ConfigFormBase class, which provides a base class for creating configuration forms
* in a Drupal module.
*/
class UwKualiArchiveForm extends ConfigFormBase {
public const SETTINGS = 'uw_kuali.archive.settings';
/**
* {@inheritDoc}
*/
protected function getEditableConfigNames() {
return [
'uw_kuali.archive.settings.UG',
'uw_kuali.archive.settings.GRD',
];
}
/**
* {@inheritDoc}
*/
public function getFormId(): string {
return 'uw_kuali_archive_form';
}
/**
* {@inheritDoc}
*/
public function buildForm(array $form, FormStateInterface $form_state, string $career = NULL) {
$settings = $this->config(static::SETTINGS . '.' . $career);
$form['career'] = [
'#type' => 'textfield',
'#title' => $this->t('Career ' . $career),
'#default_value' => $settings->get('career') ?? $career,
];
return parent::buildForm($form, $form_state);
}
}
Loading