|
| 1 | +<?php |
| 2 | +// This file is part of Moodle - http://moodle.org/ |
| 3 | +// |
| 4 | +// Moodle is free software: you can redistribute it and/or modify |
| 5 | +// it under the terms of the GNU General Public License as published by |
| 6 | +// the Free Software Foundation, either version 3 of the License, or |
| 7 | +// (at your option) any later version. |
| 8 | +// |
| 9 | +// Moodle is distributed in the hope that it will be useful, |
| 10 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +// GNU General Public License for more details. |
| 13 | +// |
| 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/>. |
| 16 | + |
| 17 | +namespace tool_langimport\hook; |
| 18 | + |
| 19 | +/** |
| 20 | + * Hook dispatched after language packs have been updated, before the string cache is purged. |
| 21 | + * |
| 22 | + * This hook allows plugins to perform actions after language pack updates |
| 23 | + * are completed but before the language string cache is reset. |
| 24 | + * |
| 25 | + * @package tool_langimport |
| 26 | + * @copyright 2026 ISB Bayern |
| 27 | + * @author Dr. Peter Mayer |
| 28 | + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| 29 | + */ |
| 30 | +#[\core\attribute\label('Allows plugins to perform actions after language packs are updated, before the string cache is purged.')] |
| 31 | +#[\core\attribute\tags('language', 'langimport')] |
| 32 | +class after_langpacks_updated { |
| 33 | + /** |
| 34 | + * Constructor for the hook. |
| 35 | + * |
| 36 | + * @param array $updatedlangs Array of language codes that were updated. |
| 37 | + */ |
| 38 | + public function __construct( |
| 39 | + /** @var array Array of language codes that were updated */ |
| 40 | + public readonly array $updatedlangs, |
| 41 | + ) { |
| 42 | + } |
| 43 | +} |
0 commit comments