Inflector Helper
This helper adds functionality not available in the CodeIgniter Inflector Helper.
Functions
humanize($str)
**Overrides default CodeIgniter function.**
Takes multiple words separated by underscores and changes them to spaces.
Name | Default | Required | Description |
---|---|---|---|
str | Yes | A string to humanize. |
// usage
humanize('what_would_you_like_to_do_today');
// output
'What Would You Like To Do Today'
keywords($str)
Takes multiple words separated by spaces and changes them to keywords in the PyroCMS context. Makes sure the keywords are separated by a comma followed by a space.
Name | Default | Required | Description |
---|---|---|---|
str | Yes | Keywords separated by spaces: Ex: 'keyword_1 keyword_2 keyword_3' |
// usage
keywords('keyword_1 keyword_2 keyword_3');
// output
'keyword_1, keyword_2, keyword_3'