protected static function get_custom_types() {
        global $CFG;
        if (!empty($CFG->customfiletypes)) {
            if (is_array($CFG->customfiletypes)) {
                // You can define this as an array in config.php...
                return $CFG->customfiletypes;
            } else {
                // Or as a JSON string in the config table.
                return json_decode($CFG->customfiletypes);
            }
        } else {
            return array();
        }
    }
protected static function get_custom_types() {
        global $CFG;
        if (!empty($CFG->customfiletypes)) {
            if (is_array($CFG->customfiletypes)) {
                // You can define this as an array in config.php...
                return $CFG->customfiletypes;
            } else {
                // Or as a JSON string in the config table.
                return json_decode($CFG->customfiletypes);
            }
        } else {
            return array();
        }
    }
protected static function get_custom_types ( ) { global $ CFG ; if ( ! empty ( $ CFG -> customfiletypes ) ) { if ( is_array ( $ CFG -> customfiletypes ) ) { // You can define this as an array in config.php... return $ CFG -> customfiletypes ; } else { // Or as a JSON string in the config table. return json_decode ( $ CFG -> customfiletypes ) ; } } else { return array ( ) ; } }
Gets custom types from config variable, after decoding the JSON if required.

@return array Array of custom types (empty array if none)
Gets custom types from config variable after decoding the JSON if required .