Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 110... Línea 110...
110
     *     behat_{component}
110
     *     behat_{component}
111
     *
111
     *
112
     * This method will return all contexts which match the specified prefix.
112
     * This method will return all contexts which match the specified prefix.
113
     *
113
     *
114
     * For example, to find all editors, you would pass in 'behat_editor', and this might return:
114
     * For example, to find all editors, you would pass in 'behat_editor', and this might return:
115
     * - behat_editor_atto
115
     * - behat_editor_tiny
116
     * - behat_editor_textarea
116
     * - behat_editor_textarea
117
     *
117
     *
118
     * @param string $prefix The prefix to search for
118
     * @param string $prefix The prefix to search for
119
     * @return \Behat\Behat\Context\Context[]
119
     * @return \Behat\Behat\Context\Context[]
120
     */
120
     */
Línea 146... Línea 146...
146
        $overrideclassname = "behat_theme_{$suitename}_{$classname}";
146
        $overrideclassname = "behat_theme_{$suitename}_{$classname}";
147
        if (self::$environment->hasContextClass($overrideclassname)) {
147
        if (self::$environment->hasContextClass($overrideclassname)) {
148
            return $overrideclassname;
148
            return $overrideclassname;
149
        }
149
        }
Línea -... Línea 150...
-
 
150
 
-
 
151
        try {
-
 
152
            $themeconfig = theme_config::load($suitename);
-
 
153
        } catch (Exception $e) {
-
 
154
            // This theme has no theme config.
-
 
155
            return null;
-
 
156
        }
-
 
157
 
-
 
158
        // The theme will use all core contexts, except the one overridden by theme or its parent.
-
 
159
        if (isset($themeconfig->parents)) {
-
 
160
            foreach ($themeconfig->parents as $parent) {
-
 
161
                $overrideclassname = "behat_theme_{$parent}_{$classname}";
-
 
162
                if (self::$environment->hasContextClass($overrideclassname)) {
-
 
163
                    return $overrideclassname;
-
 
164
                }
-
 
165
            }
-
 
166
        }
150
 
167
 
151
        if (self::$environment->hasContextClass($classname)) {
168
        if (self::$environment->hasContextClass($classname)) {
152
            return $classname;
169
            return $classname;
Línea 153... Línea 170...
153
        }
170
        }