Code Duplication    Length = 7-7 lines in 5 locations

classes/settings/renderer.php 5 locations

@@ 99-105 (lines=7) @@
96
     *
97
     * @return Object
98
     */
99
    public function render_group_element_text($name, $default = null, $type = PARAM_RAW) {
100
        $item = new \admin_setting_configtext('bigbluebuttonbn_' . $name,
101
                get_string('config_' . $name, 'bigbluebuttonbn'),
102
                get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
103
                $default, $type);
104
        return $item;
105
    }
106
107
    /**
108
     * Render a html editor element in a group.
@@ 116-122 (lines=7) @@
113
     *
114
     * @return Object
115
     */
116
    public function render_group_element_textarea($name, $default = null, $type = PARAM_RAW) {
117
        $item = new \admin_setting_configtextarea('bigbluebuttonbn_' . $name,
118
                get_string('config_' . $name, 'bigbluebuttonbn'),
119
                get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
120
                $default, $type);
121
        return $item;
122
    }
123
124
    /**
125
     * Render a checkbox element in a group.
@@ 132-138 (lines=7) @@
129
     *
130
     * @return Object
131
     */
132
    public function render_group_element_checkbox($name, $default = null) {
133
        $item = new \admin_setting_configcheckbox('bigbluebuttonbn_' . $name,
134
                get_string('config_' . $name, 'bigbluebuttonbn'),
135
                get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
136
                $default);
137
        return $item;
138
    }
139
140
    /**
141
     * Render a multiselect element in a group.
@@ 149-155 (lines=7) @@
146
     *
147
     * @return Object
148
     */
149
    public function render_group_element_configmultiselect($name, $defaultsetting, $choices) {
150
        $item = new \admin_setting_configmultiselect('bigbluebuttonbn_' . $name,
151
                get_string('config_' . $name, 'bigbluebuttonbn'),
152
                get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
153
                $defaultsetting, $choices);
154
        return $item;
155
    }
156
157
    /**
158
     * Render a select element in a group.
@@ 166-172 (lines=7) @@
163
     *
164
     * @return Object
165
     */
166
    public function render_group_element_configselect($name, $defaultsetting, $choices) {
167
        $item = new \admin_setting_configselect('bigbluebuttonbn_' . $name,
168
                get_string('config_' . $name, 'bigbluebuttonbn'),
169
                get_string('config_' . $name . '_description', 'bigbluebuttonbn'),
170
                $defaultsetting, $choices);
171
        return $item;
172
    }
173
174
    /**
175
     * Render a general warning message.