. /** * Designer mode * * @package core * @category check * @copyright 2020 Brendan Heywood * @copyright 2008 petr Skoda * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace core\check\performance; defined('MOODLE_INTERNAL') || die(); use core\check\check; use core\check\result; /** * Designer mode * * @copyright 2020 Brendan Heywood * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class designermode extends check { /** * Get the short check name * * @return string */ public function get_name(): string { return get_string('themedesignermode', 'admin'); } /** * A link to a place to action this * * @return action_link|null */ public function get_action_link(): ?\action_link { return new \action_link( new \moodle_url('/admin/search.php', ['query' => 'themedesignermode']), get_string('themedesignermode', 'admin')); } /** * Return result * @return result */ public function get_result(): result { global $DB, $CFG; if (empty($CFG->themedesignermode)) { $status = result::OK; $summary = get_string('check_themedesignermode_comment_disable', 'report_performance'); } else { $status = result::CRITICAL; $summary = get_string('check_themedesignermode_comment_enable', 'report_performance'); } $details = get_string('check_themedesignermode_details', 'report_performance'); return new result($status, $summary, $details); } }