report:zabbix:developerguide

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
report:zabbix:developerguide [2026/02/05 07:46] – [Defining indicators] adminreport:zabbix:developerguide [2026/02/07 19:41] (Version actuelle) – [Plugin registration method] admin
Ligne 43: Ligne 43:
  
    function xmldb_<plugin_frankenname>_after_install() {    function xmldb_<plugin_frankenname>_after_install() {
 +   
        [...]        [...]
 +   
        // Register zabbix indicators if installed.        // Register zabbix indicators if installed.
        // Note will only work with report_zabbix "pro" version.        // Note will only work with report_zabbix "pro" version.
Ligne 126: Ligne 126:
     public function acquire_submode($submode) {     public function acquire_submode($submode) {
         global $DB;         global $DB;
 +   
         if(!isset($this->value)) {         if(!isset($this->value)) {
             $this->value = new Stdclass;             $this->value = new Stdclass;
         }         }
 +   
         if (is_null($submode)) {         if (is_null($submode)) {
             $submode = $this->submode;             $submode = $this->submode;
         }         }
 +   
         switch ($submode) {         switch ($submode) {
 +   
             case 'submode1': {             case 'submode1': {
 +   
                 $submodevalue = [...]; // Whatever gets a single value in Moodle.                 $submodevalue = [...]; // Whatever gets a single value in Moodle.
 +   
                 $this->value->$submode = $submodevalue;                 $this->value->$submode = $submodevalue;
                 break;                 break;
             }             }
 +   
             default: {             default: {
                 if ($CFG->debug == DEBUG_DEVELOPER) {                 if ($CFG->debug == DEBUG_DEVELOPER) {
Ligne 151: Ligne 151:
             }             }
         }         }
 +
 +Once each submode case is written, that's all done !
  
 ---- ----
report/zabbix/developerguide.1770277595.txt.gz · Dernière modification : de admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki