public function MaestroProcessStatusBlock::blockForm in Maestro 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/Block/MaestroProcessStatusBlock.php \Drupal\maestro\Plugin\Block\MaestroProcessStatusBlock::blockForm()
Overrides BlockPluginTrait::blockForm
File
- src/
Plugin/ Block/ MaestroProcessStatusBlock.php, line 24
Class
- MaestroProcessStatusBlock
- Provides a Maestro block that shows the linear status output for processes this user belongs to or in general.
Namespace
Drupal\maestro\Plugin\BlockCode
public function blockForm($form, FormStateInterface $form_state) {
$config = $this
->getConfiguration();
$form['maestro_skip_execute_check'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Skip checking if the user is part of the process status bars shown.'),
'#description' => $this
->t('When checked, any open process can show its status. Unchecked means only those processes the user is a part of will be shown.'),
'#default_value' => isset($this->configuration['maestro_skip_execute_check']) ? $this->configuration['maestro_skip_execute_check'] : 0,
'#required' => FALSE,
];
$form['maestro_filter_process_names'] = [
'#type' => 'textfield',
'#title' => $this
->t('Simple filter to filter on process name.'),
'#description' => $this
->t('Specify the filter you wish to limit on. Filter uses %{your-filter}% database filtering. Available current user tokens are [uid] and [username].'),
'#default_value' => isset($this->configuration['maestro_filter_process_names']) ? $this->configuration['maestro_filter_process_names'] : '',
'#required' => FALSE,
];
$form['maestro_provide_link'] = [
'#type' => 'textfield',
'#title' => $this
->t('Make the Process Name a link to the following URL.'),
'#description' => $this
->t('No link when left blank. Available current user tokens are [uid] and [username].'),
'#default_value' => isset($this->configuration['maestro_provide_link']) ? $this->configuration['maestro_provide_link'] : '',
'#required' => FALSE,
];
$form['maestro_link_tooltip'] = [
'#type' => 'textfield',
'#title' => $this
->t('The hover-over tooltip for the link.'),
'#description' => $this
->t('If you enter a link above, the tooltip entered here will be shown. Defaults to nothing.'),
'#default_value' => isset($this->configuration['maestro_link_tooltip']) ? $this->configuration['maestro_link_tooltip'] : '',
'#required' => FALSE,
];
return $form;
}