public function MaestroProcessStatusController::closeDetails in Maestro 8.2
Same name and namespace in other branches
- 3.x src/Controller/MaestroProcessStatusController.php \Drupal\maestro\Controller\MaestroProcessStatusController::closeDetails()
Close Details method.
1 string reference to 'MaestroProcessStatusController::closeDetails'
File
- src/
Controller/ MaestroProcessStatusController.php, line 115
Class
- MaestroProcessStatusController
- Maestro Process Status Controller class.
Namespace
Drupal\maestro\ControllerCode
public function closeDetails($processID) {
$build = [];
// We replace the up arrow with the down arrow.
$build['expand'] = [
'#attributes' => [
'class' => [
'maestro-timeline-status',
'maestro-status-toggle',
],
'title' => $this
->t('Open Details'),
],
'#type' => 'link',
'#id' => 'maestro-id-ajax-' . $processID,
'#url' => Url::fromRoute('maestro.process_details_ajax_open', [
'processID' => $processID,
]),
'#title' => $this
->t('Open Details'),
'#ajax' => [
'progress' => [
'type' => 'throbber',
'message' => NULL,
],
],
];
$response = new AjaxResponse();
$response
->addCommand(new HtmlCommand('#maestro-ajax-' . $processID, ''));
$response
->addCommand(new HtmlCommand('.maestro-status-toggle-' . $processID, $build['expand']));
$response
->addCommand(new CssCommand('#details_replace_row_' . $processID, [
'display' => 'none',
]));
return $response;
}