yii\helpers\BaseInflector::titleize PHP Method

titleize() public static method

Converts an underscored or CamelCase word into a English sentence.
public static titleize ( string $words, boolean $ucAll = false ) : string
$words string
$ucAll boolean whether to set all words to uppercase
return string
    public static function titleize($words, $ucAll = false)
    {
        $words = static::humanize(static::underscore($words), $ucAll);
        return $ucAll ? ucwords($words) : ucfirst($words);
    }