Ferreteria/v0.6/clade/Sys/Events/InputRq/@fx/WithItemPiece
Jump to navigation
Jump to search
|
fx:
WithItemPiece() |
About
- General: WithItemPiece
Code
#
protected function WithItemPiece(ItemIface $oItem, PieceIface $oPiece) : void {
$this->Item($oItem);
if ($oPiece->HasValue()) {
$sVal = $oPiece->Value();
$this->ParseInputArgs($oPiece->GetExtras());
} else {
// check for default (used if request is present but with no value):
$osDef = $oItem->SDefault(); // TODO: Implement as $this->Attrs()->QryIt('valdef');
if ($osDef->HasIt()) {
$sVal = $osDef->GetIt();
} else {
$sVal = '';
}
}
$this->ParseInputString($sVal);
}