Module development: Difference between revisions

Tag: 2017 source edit
Line 137: Line 137:


*Part 2: A code to identify tab to add (start with +tabname1) or to remove (start with -tabname1)
*Part 2: A code to identify tab to add (start with +tabname1) or to remove (start with -tabname1)
*Part 3: The title of the tab(<syntaxhighlight lang="PHP">
*Part 3: The title of the tab(Title1);                                                    // To remove an existing tab identified by code tabname
// Array to add new pages in new tabs or remove existing one
$this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mypagetab1.php?id=__ID__'    // To add a new tab identified by code tabname1
                            'objecttype:+tabname2:Title2:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mypagetab2.php?id=__ID__',  // To add a new tab identified by code tabname2
                            'objecttype:-tabname');                                                    // To remove an existing tab identified by code tabname
</syntaxhighlight>. This can be a hardcoded read or better a code translation in module lang file .
</syntaxhighlight>. This can be a hardcoded read or better a code translation in module lang file .
*Part 4: The name of the file "*.lang" (<syntaxhighlight lang="PHP">
*Part 4: The name of the file "*.lang" (<syntaxhighlight lang="PHP">
83

edits