Utility Functions in Bootstrap
bootTrimExtension($assets, $extension)
Purpose: when passed an array (or string) of assets, each asset will be reduced to the asset file name without the supplied $extension if found
Returns: $assets, in original variable type, with the $extension trimmed from the end of the filename(s). (If passed a string, a string will be returned, otherwise if passed an array, then an array is returned)
Examples:
- //array('site.css', 'avenger.css', 'correct');
- // returns: array('site', 'avenger', 'correct');
- $assets = bootTrimExtension($assets, '.css');
- // It's good to remove .ctp, otherwise, .ctp will be added and you'll end up with .ctp.ctp in some cases
- $output = $this->viewObject->element( bootTrimExtension($question['name'], '.ctp') );