Futilities/v0.6/clade/Kiosk/@fx/DescribeActions: Difference between revisions
< Futilities | v0.6 | clade | Kiosk | @fx
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
| Line 3: | Line 3: | ||
* '''General''': {{l/ver/fx|DescribeActions}} | * '''General''': {{l/ver/fx|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. | * '''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 <code>[[../RenderCommonHelp/]]()). | * '''Note''': Displaying help info, if there's nothing to do, is not the job of this method; it's done elsewhere (and implemented by <code>[[../RenderCommonHelp/]]()</code>). | ||
==History== | ==History== | ||
* '''{{fmt/date|2024|11|09}}''' Removed help display when no action requested -- it's redundant, and done better elsewhere. | * '''{{fmt/date|2024|11|09}}''' Removed help display when no action requested -- it's redundant, and done better elsewhere. | ||
Latest revision as of 02:18, 16 November 2025
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;