Skip to content

Instantly share code, notes, and snippets.

@kbjohnson90
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbjohnson90/10315416 to your computer and use it in GitHub Desktop.
Save kbjohnson90/10315416 to your computer and use it in GitHub Desktop.
FUEL CMS Forum: (1704) Helper Function Redeclaration
<?php
/**
* Get Modules
*
* Returns a list of Modules from the 'modules_allowed' configuration
*
* @access public
* @return array modules
*/
function event_helper_get_modules() {
if ( !function_exists('get_modules') ) {
function get_modules() {
$CI =& get_instance();
static $modules;
if (is_null($modules)) {
$modules[] = 'app';
$modules = array_merge($modules, $CI->fuel->config('modules_allowed'));
}
return array_combine($modules, $modules);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment