Skip to content
Snippets Groups Projects
Commit e7f3739e authored by Daniel Speicher's avatar Daniel Speicher
Browse files

Issue #3442076: Implement interfaces of framework

parent bba83314
No related branches found
No related tags found
No related merge requests found
Pipeline #156523 canceled
......@@ -49,43 +49,20 @@ class GitLab extends PluginBase {
'#type' => 'textfield',
'#title' => $this->t('API Token'),
] + $required;
$form['group'] = [
$form['project_id'] = [
'#type' => 'textfield',
'#title' => $this->t('Group'),
'#default_value' => $helpdesk->get('group'),
'#title' => $this->t('GitLab Project ID'),
'#default_value' => $helpdesk->get('project_id'),
];
$form['max_file_size'] = [
'#type' => 'number',
'#title' => $this->t('Max. file size for attachments (in MB)'),
'#min' => 1,
] + $required;
$states = $helpdesk->get('url') ? $this->getStates($helpdesk) : [];
$form['states'] = [
'#type' => 'value',
'#value' => $states,
];
$form['state_closed'] = [
'#type' => 'select',
'#title' => $this->t('Closed ticket state'),
'#options' => $states,
];
return $form;
}
/**
* Get all states from the helpdesk.
*
* @param \Drupal\helpdesk_integration\HelpdeskInterface $helpdesk
* The helpdesk entity with the instance's configuration.
*
* @return array
* List of all active states indexed by their remote state ID.
*/
private function getStates(HelpdeskInterface $helpdesk): array {
return [];
}
/**
* {@inheritdoc}
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment