protected function showFieldLabels($field)
    {
        if (in_array($field->type, ['checkbox', 'switch', 'section'])) {
            return false;
        }

        if ($field->type === 'widget') {
            return $this->makeFormFieldWidget($field)->showLabels;
        }

        return true;
    }
protected function showFieldLabels($field)
    {
        if (in_array($field->type, ['checkbox', 'switch', 'section'])) {
            return false;
        }

        if ($field->type === 'widget') {
            return $this->makeFormFieldWidget($field)->showLabels;
        }

        return true;
    }
protected function showFieldLabels ( $ field ) { if ( in_array ( $ field -> type , [ 'checkbox' , 'switch' , 'section' ] ) ) { return false ; } if ( $ field -> type === 'widget' ) { return $ this -> makeFormFieldWidget ( $ field ) -> showLabels ; } return true ; }
Helper method to determine if field should be rendered
with label and comments.
@param  \Backend\Classes\FormField $field
@return boolean
Helper method to determine if field should be rendered with label and comments .