Former\Traits\Field::wrapAndRender PHP Method

wrapAndRender() public method

Prints out the field, wrapped in its group
public wrapAndRender ( ) : string
return string
    public function wrapAndRender()
    {
        // Dry syntax (hidden fields, plain fields)
        if ($this->isUnwrappable()) {
            $html = $this->render();
            // Control group syntax
        } elseif (Form::hasInstanceOpened()) {
            $html = $this->group->wrapField($this);
            // Classic syntax
        } else {
            $html = $this->currentFramework()->createLabelOf($this);
            $html .= $this->render();
        }
        return $html;
    }