src/Common/Model/Base.php
protected function describeFieldsPrepareLabel($sLabel)
    {
        $aPatterns = [
            //  Common words
            '/\bid\b/i'   => 'ID',
            '/\burl\b/i'  => 'URL',
            '/\bhtml\b/i' => 'HTML',
            //  Common file extensions
            '/\bpdf\b/i'  => 'PDF',
        ];

        $sLabel = ucwords(preg_replace('/[\-_]/', ' ', $sLabel));
        $sLabel = preg_replace(array_keys($aPatterns), array_values($aPatterns), $sLabel);

        return $sLabel;
    }
protected function describeFieldsPrepareLabel($sLabel)
    {
        $aPatterns = [
            //  Common words
            '/\bid\b/i'   => 'ID',
            '/\burl\b/i'  => 'URL',
            '/\bhtml\b/i' => 'HTML',
            //  Common file extensions
            '/\bpdf\b/i'  => 'PDF',
        ];

        $sLabel = ucwords(preg_replace('/[\-_]/', ' ', $sLabel));
        $sLabel = preg_replace(array_keys($aPatterns), array_values($aPatterns), $sLabel);

        return $sLabel;
    }
protected function describeFieldsPrepareLabel ( $ sLabel ) { $ aPatterns = [ //  Common words '/\bid\b/i' => 'ID' , '/\burl\b/i' => 'URL' , '/\bhtml\b/i' => 'HTML' , //  Common file extensions '/\bpdf\b/i' => 'PDF' , ] ; $ sLabel = ucwords ( preg_replace ( '/[\-_]/' , ' ' , $ sLabel ) ) ; $ sLabel = preg_replace ( array_keys ( $ aPatterns ) , array_values ( $ aPatterns ) , $ sLabel ) ; return $ sLabel ; }
Generates a human friendly label from the field's key

@param string $sLabel The label to format

@return string
Generates a human friendly label from the field s key