56
edits
(見出し翻訳) |
mNo edit summary |
||
| Line 43: | Line 43: | ||
=テンプレート外部モジュールの例= | =テンプレート外部モジュールの例= | ||
外部モジュールの開発を開始するのによいお手本は、ここで見つかるだろう : [https://github.com/Dolibarr/dolibarr/tree/develop/htdocs/modulebuilder/template GitHub Dolibarr Module Modèle] | |||
=自前モジュールを作る= | =自前モジュールを作る= | ||
==自前モジュールに関するモジュール説明(Module descriptor)を作る (必須)== | ==自前モジュールに関するモジュール説明(Module descriptor)を作る (必須)== | ||
''' | '''必須となる時期''': アドオンを開発すると早急に必要、たとえゴールが何であれ (例外はスキンの追加). | ||
''' | '''Dolibarr 9.0 から, モジュールビルダ (ModuleBuilder) モジュールを使用すべきだ、モジュール説明を生成するための標準モデルとして使える''' | ||
=== | ===自前のモジュール説明 (module descriptor) を作成する=== | ||
最初のステップは、モジュールに対するファイル説明 (file descriptor) を作成すること. | |||
* | *ディレクトリ作成: '''/htdocs/custom/''mymodule''/core/modules''' (外部モジュール向け) または '''/htdocs/''mymodule''/core/modules''' 、 Dolibarr の公式コアモジュール (official core module) とする場合は. 次にファイル modMyModule.class.php をディレクトリ '''htdocs/modulebuilder/template''' からコピーして上記のディレクトリに作成する. ファイルの名称を modMyModule.class.php から 自前モジュールの目的に合致した名称に変える. ファイル名は、先頭に 'mod' があり、最後が .class.php で終わる (例えば、ファイル名を '新名' にするなら, 'mod新名.class.php' となる). | ||
次は、ファイルの内容を以下のように変える: | |||
*Replace all "modMyModule" with a value which corresponds to the purpose of your module. This value must always start with 'mod' and contain only alpha characters (again, if the name given to the file was 'NewName', then replace all "modMyModule" with "modNewName"). | *Replace all "modMyModule" with a value which corresponds to the purpose of your module. This value must always start with 'mod' and contain only alpha characters (again, if the name given to the file was 'NewName', then replace all "modMyModule" with "modNewName"). | ||
| Line 64: | Line 64: | ||
Your file descriptor for your module is ready. See the next step to activate it. | Your file descriptor for your module is ready. See the next step to activate it. | ||
=== | ===自前の説明をテストする=== | ||
Launch Dolibarr and go to page '''Setup->module'''? | Launch Dolibarr and go to page '''Setup->module'''? | ||
| Line 70: | Line 70: | ||
==新規モジュールファイルに関するパスツリー (必須)== | ==新規モジュールファイルに関するパスツリー (必須)== | ||
これは、新しいモジュールを構築する際に、ファイルをどう整理するかを示している (ZIPファイルもこのルールに合わせる必要あり). | |||
注:2行目だけが必須. | |||
{{TemplateModuleTreeSimple}} | {{TemplateModuleTreeSimple}} | ||
edits