Row actions
Actions per row as icons or in a menu: links, dialogs loaded with htmx, conditional actions.
Try it: log in with the demo account
Email demo@frontdesk-demo.test · Password Try-Frontdesk-2026
Everyone shares this account. You may change anything – all data is reset every night.
The code
app/src/Controllers/TaskController.php – "Mark as done" in a dialog
whole file
protected function defineRowActions(DataObject $record): array
{
/** @var Task $record */
return [
RowAction::link('Open project', ProjectController::singleton()->Link('view/' . $record->ProjectID))
->withIcon('external-link')
->direct(),
RowAction::htmx('Mark as done', $this->Link('done/' . $record->ID))
->withIcon('check')
->direct()
->enabled(fn () => $this->canEdit()),
];
}
/**
* GET: confirmation in the modal; POST (with security token): marks the
* task as done and goes back to the list.
*/
public function done(HTTPRequest $request): HTTPResponse
{
/** @var Task|null $task */
$task = $this->findRecord((int) $request->param('ID'), 'canEdit');
if (!$task) {
return $this->httpError(404);
}
if (!$request->isPOST()) {
return $this->renderPartial('App\\Includes\\ConfirmDone', [
'Task' => $task,
'Action' => $this->Link('done/' . $task->ID),
'Token' => SecurityToken::inst()->getValue(),
]);
}
if (!SecurityToken::inst()->checkRequest($request)) {
return $this->httpError(400);
}
$task->Status = 'done';
$task->write();
$this->flash('"' . $task->Title . '" is done.');
return $this->redirect($this->Link() . '?' . http_build_query(['view' => $request->getVar('view') ?: 'mine']));
}
app/src/Controllers/ContactController.php – Mail and call, only when there is an address
whole file
protected function defineRowActions(DataObject $record): array
{
/** @var Contact $record */
$actions = [
RowAction::link('Send mail', 'mailto:' . $record->Email)
->withIcon('mail')
->direct()
->enabled((bool) $record->Email),
RowAction::link('Call', 'tel:' . preg_replace('/[^0-9+]/', '', (string) $record->Phone))
->withIcon('phone')
->direct()
->enabled((bool) $record->Phone),
RowAction::link('View', $this->Link('view/' . $record->ID)),
];
if ($this->canEdit()) {
$actions[] = RowAction::edit($this->Link('edit/' . $record->ID));
$actions[] = RowAction::delete($this->Link('delete/' . $record->ID));
}
return $actions;
}