classes/local/utils.php
/**
     * Converts the membership config string into an array of information that can be
     * then added to the footer via the "footer_address" mustache template.
     * Structure:
     *     languagestringlabel|url
     *
     * Example structure:
     *     mentionlegales|local/mcms/index.php?p=mentions-legales
     *
     * Converted into: an object with title and absolute url
     *
     * @param \moodle_page $page
     * @return array
     * @throws \dml_exception
     */
Converts the membership config string into an array of information that can be
then added to the footer via the "footer_address" mustache template.
Structure:
languagestringlabel|url



Converted into: an object with title and absolute url

@param \moodle_page $page
@return array
@throws \dml_exception
Converts the membership config string into an array of information that can be then added to the footer via the " footer_address " mustache template . Structure : languagestringlabel|url Converted into : an object with title and absolute url @param \ moodle_page $page @return array @throws \ dml_exception
public static function convert_legallinks_config() {
        $configtext = get_config('theme_envf', 'legallinks');
        $lineparser = function($setting, $index, &$currentobject) {
            if (!empty($setting)) {
                switch ($index) {
                    case 0:
                        $currentobject->label = get_string(trim($setting), 'theme_envf');
                        break;
                    case 1:
                        $currentobject->link = '';
                        try {
                            $currentobject->link = (new \moodle_url($setting))->out();
                        } catch (\moodle_exception $e) {
                        }
                        break;
                }
            }
        };
        return \theme_clboost\local\utils::convert_from_config($configtext, $lineparser, '|');
    }
public static function convert_legallinks_config ( ) { $ configtext = get_config ( 'theme_envf' , 'legallinks' ) ; $ lineparser = function ( $ setting , $ index , & $ currentobject ) { if ( ! empty ( $ setting ) ) { switch ( $ index ) { case 0 : $ currentobject -> label = get_string ( trim ( $ setting ) , 'theme_envf' ) ; break ; case 1 : $ currentobject -> link = '' ; try { $ currentobject -> link = ( new \ moodle_url ( $ setting ) ) -> out ( ) ; } catch ( \ moodle_exception $ e ) { } break ; } } } ; return \ theme_clboost \ local \ utils :: convert_from_config ( $ configtext , $ lineparser , '|' ) ; }
Converts the membership config string into an array of information that can be
 then added to the footer via the "footer_address" mustache template.
Converts the membership config string into an array of information that can be then added to the footer via the " footer_address " mustache template .
// We don't do anything here. The url will be empty. // Line separator is comma as we use '|' for the url information.