public function get_setting($name) {
        $namewithprefix = 'section_' . $this->sectionid . '_' . $name;
        $result = null;
        foreach ($this->settings as $key => $setting) {
            if ($setting->get_name() == $namewithprefix) {
                if ($result != null) {
                    throw new base_task_exception('multiple_settings_by_name_found', $namewithprefix);
                } else {
                    $result = $setting;
                }
            }
        }
        if ($result) {
            return $result;
        } else {
            // Fallback to parent
            return parent::get_setting($name);
        }
    }
public function get_setting($name) {
        $namewithprefix = 'section_' . $this->sectionid . '_' . $name;
        $result = null;
        foreach ($this->settings as $key => $setting) {
            if ($setting->get_name() == $namewithprefix) {
                if ($result != null) {
                    throw new base_task_exception('multiple_settings_by_name_found', $namewithprefix);
                } else {
                    $result = $setting;
                }
            }
        }
        if ($result) {
            return $result;
        } else {
            // Fallback to parent
            return parent::get_setting($name);
        }
    }
public function get_setting ( $ name ) { $ namewithprefix = 'section_' . $ this -> sectionid . '_' . $ name ; $ result = null ; foreach ( $ this -> settings as $ key => $ setting ) { if ( $ setting -> get_name ( ) == $ namewithprefix ) { if ( $ result != null ) { throw new base_task_exception ( 'multiple_settings_by_name_found' , $ namewithprefix ) ; } else { $ result = $ setting ; } } } if ( $ result ) { return $ result ; } else { // Fallback to parent return parent :: get_setting ( $ name ) ; } }
Specialisation that, first of all, looks for the setting within
the task with the the prefix added and later, delegates to parent
without adding anything
Specialisation that first of all looks for the setting within the task with the the prefix added and later delegates to parent without adding anything