syntaxe POO (visibilité)
[mw_hello] / mw_hello.php
index 16580a4..b95aa62 100644 (file)
@@ -2,34 +2,17 @@
 
   class mw_hello extends mw_plugin{
 
-    function title(){
+    public function title(){
       return "Hello World !";
     }
 
-    function description(){
-      return "Un plugin qui affiche une page Hello World ! avec une citation alĂ©atoire";
+    public function description(){
+      return "Un plugin qui affiche une page Hello World !";
     }
 
-    function install($env){
-      return true;
-    }
-
-    function uninstall($env){
-      return true;
-    }
-
-    function enable($env){
-      return true;
-    }
-
-    function disable($env){
-      return true;
-    }
-
-    function init($env){
+    public function init($env){
+      $env->set_link("menu_top/hello", $env->url("hello"), "Hello");
       return true;
     }
 
   }
-
-?>
\ No newline at end of file