Contao\Widget::generateWithError PHP Метод

generateWithError() публичный Метод

Generate the widget with error message and return it as string
public generateWithError ( boolean $blnSwitchOrder = false ) : string
$blnSwitchOrder boolean If true, the error message will be shown below the field
Результат string The form field markup
    public function generateWithError($blnSwitchOrder = false)
    {
        $strWidget = $this->generate();
        $strError = $this->getErrorAsHTML();
        return $blnSwitchOrder ? $strWidget . $strError : $strError . $strWidget;
    }