/** * @param FormInterface $form * * @return string */ public function result(FormInterface $form) { if ($form->getStatus() == Form::STATUS_SHOW_RESULT) { $templateStr = Config::get(['renderer', 'templates', $form->getTemplate(), 'result']); $template = new Template($templateStr); return $template->getString($this, $form); } return ''; }
/** * @param FormInterface|BlockInterface|FieldInterface $object * * @return string */ public function errors($object) { $errors = $object->getErrors(); if (empty($errors)) { return ''; } $templateStr = Config::find(['renderer'], ['templates', $object->getTemplate(), 'errors'], $object->getClass(), ''); $template = new Template($templateStr); return $template->getString($this, $object); }
/** * @param FormInterface|BlockInterface|FieldInterface $object * * @return string */ public function label($object) { $templateStr = Config::find(['renderer'], ['templates', $object->getTemplate(), 'label'], $object->getClass(), ''); $template = new Template($templateStr); return $template->getString($this, $object); }