19declare(strict_types=1);
48 throw new \LogicException(
49 $activity_class .
'::getInputDescription() must return a FormInput built from the ' .
50 'UI framework (i.e. one that also implements ' . InputInternal::class .
') to be ' .
51 'grindable by maybePerformAs() - see the GrindsFormInput trait for why.'
70 return $with_input->getContent();
75 return $input instanceof
InputInternal ? $input->getName() :
null;
80 return $input instanceof
InputInternal ? $input->getError() :
null;
91 throw new \LogicException($exception_message);
98 return $input instanceof \ILIAS\UI\Implementation\Component\Input\Input
99 ? $input->getDedicatedName()
107 throw new \LogicException(
108 'Expected a FormInput also implementing ' . InputInternal::class .
' (needed for ' .
109 $needed_for .
'), got: ' . get_debug_type($input)
A result encapsulates a value or an error and simplifies the handling of those.