Futilities/v0.6/clade/Kiosk/@fx/DescribeActions
< Futilities | v0.6 | clade | Kiosk | @fx
Jump to navigation
Jump to search
DescribeActions() |
About
- General: DescribeActions
- Action: describe the app and what it's planning to do (or would try to do but can't for some reason), based on the current command-line options.
- Note: Displaying help info, if there's nothing to do, is not the job of this method; it's done elsewhere (and implemented by
RenderCommonHelp()).
History
- 2024-11-09 Removed help display when no action requested -- it's redundant, and done better elsewhere.
- 2024-11-16 Restored the help display, because it's no longer being generated elsewhere.
- 2025-11-15 This must have been removed again later; it's not in there now.
- 2025-03-07 renamed DescribeSelf() -> DescribeActions()
- 2025-04-04 moved from app-specific Kiosk to here
Code
public function DescribeActions() : string {
// 2025-04-03 What if we just copy from DBA?
$oScrn = self::Screen();
$sSelf = $this->FTagFor_AppItem()->Summary();
#$osPath = $this->QStoragePath();
$sOut = $sSelf.CRLF;
$oActs = $this->Actions();
$nActs = $oActs->Count();
if ($nActs == 0) {
$sOut .= 'No action requested.'.CRLF;
$sOut .= $this->RenderHelpText();
} else {
$sS = ($nActs == 1) ? '' : 's';
$sOut .= "Planned action$sS:".CRLF;
$oList = $oScrn->NewList();
#echo $oList->ReflectThis()->Report();
foreach ($oActs as $sKey => $oAct) {
$oList->AddLine($oAct->Describe());
#$sOut .= $oAct->Describe();
}
$sOut .= $oList->Render();
}
return $sOut;
}
Removed
2025-11-15
// 2025-04-03 old incomplete code
$sSelf = $this->FTagFor_AppItem()->Summary();
$sOut = $sSelf.' (WORK NEEDED HERE)'.CRLF;
return $sOut;