public static function formatter($view, $field)
    {
        switch ($field->viewModeSettings['formatter']) {
            case 'link':
                $out = $view->element('Field.FileField/display_link', compact('field'));
                break;
            case 'table':
                $out = $view->element('Field.FileField/display_table', compact('field'));
                break;
            case 'url':
            default:
                $out = $view->element('Field.FileField/display_url', compact('field'));
                break;
        }

        return $out;
    }
public static function formatter($view, $field)
    {
        switch ($field->viewModeSettings['formatter']) {
            case 'link':
                $out = $view->element('Field.FileField/display_link', compact('field'));
                break;
            case 'table':
                $out = $view->element('Field.FileField/display_table', compact('field'));
                break;
            case 'url':
            default:
                $out = $view->element('Field.FileField/display_url', compact('field'));
                break;
        }

        return $out;
    }
public static function formatter ( $ view , $ field ) { switch ( $ field -> viewModeSettings [ 'formatter' ] ) { case 'link' : $ out = $ view -> element ( 'Field.FileField/display_link' , compact ( 'field' ) ) ; break ; case 'table' : $ out = $ view -> element ( 'Field.FileField/display_table' , compact ( 'field' ) ) ; break ; case 'url' : default : $ out = $ view -> element ( 'Field.FileField/display_url' , compact ( 'field' ) ) ; break ; } return $ out ; }
Renders the given custom field.

@param \Cake\View\View $view Instance of view class
@param \Field\Model\Entity\Field $field The field to be rendered
@return string HTML code
Renders the given custom field .