Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 12... Línea 12...
12
// GNU General Public License for more details.
12
// GNU General Public License for more details.
13
//
13
//
14
// You should have received a copy of the GNU General Public License
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
Línea 16... Línea -...
16
 
-
 
17
/**
-
 
18
 * Contains class \core\output\icon_system
-
 
19
 *
-
 
20
 * @package    core
-
 
21
 * @category   output
-
 
22
 * @copyright  2016 Damyon Wiese
-
 
23
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
-
 
24
 */
-
 
25
 
16
 
Línea 26... Línea -...
26
namespace core\output;
-
 
27
 
-
 
28
use renderer_base;
-
 
29
use pix_icon;
-
 
30
 
-
 
31
defined('MOODLE_INTERNAL') || die();
17
namespace core\output;
32
 
18
 
33
/**
19
/**
34
 * Class allowing different systems for mapping and rendering icons.
20
 * Class allowing different systems for mapping and rendering icons.
35
 *
21
 *
Línea 159... Línea 145...
159
     * Clears the instance cache, for use in unit tests
145
     * Clears the instance cache, for use in unit tests
160
     */
146
     */
161
    public static function reset_caches() {
147
    public static function reset_caches() {
162
        self::$instance = null;
148
        self::$instance = null;
163
    }
149
    }
-
 
150
 
-
 
151
    /**
-
 
152
     * Overridable function to get the list of deprecated icons.
-
 
153
     *
-
 
154
     * @return array with the deprecated key icons (for instance, core:a/download_all).
-
 
155
     */
-
 
156
    public function get_deprecated_icons(): array {
-
 
157
        $deprecated = [];
-
 
158
        // Include deprecated icons in plugins too.
-
 
159
        $callback = 'get_deprecated_icons';
-
 
160
 
-
 
161
        if ($pluginsfunction = get_plugins_with_function($callback)) {
-
 
162
            foreach ($pluginsfunction as $plugintype => $plugins) {
-
 
163
                foreach ($plugins as $pluginfunction) {
-
 
164
                    $plugindeprecated = $pluginfunction();
-
 
165
                    $deprecated += $plugindeprecated;
-
 
166
                }
-
 
167
            }
-
 
168
        }
-
 
169
 
-
 
170
        return $deprecated;
-
 
171
    }
164
}
172
}