Changes

m
Adding interlang links (links to translated versions of this page in other languages) triggered by origin English page "Module_development" update.
Line 1: Line 1: −
<!-- BEGIN origin interlang links -->
+
<!-- BEGIN interlang links -->
<!-- You can edit this section but do NOT remove these comments
+
<!-- Do NOT edit this section
     Links below will be automatically replicated on translated pages by PolyglotBot -->
+
     Links below are automatically managed by PolyglotBot
 +
    You can edit links on the English source page : Module_development -->
 +
[[en:Module_development]]
 
[[fr:Développement_module]]
 
[[fr:Développement_module]]
 
[[es:Desarrollo_de_un_módulo]]
 
[[es:Desarrollo_de_un_módulo]]
Line 129: Line 131:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
テーブルには文字列のリストが含まれ、各文字列は新しいタブを表す.文字列の形式は ": " で区切られた5つの部分で構成される.
+
テーブルには文字列のリストが含まれ、各文字列は新しいタブを表す.文字列の形式は ": " で区切られた5つの部分からなる.
    
*Part 1: タブを表示するエレメントタイプ(オブジェクトタイプ)で、以下の値:
 
*Part 1: タブを表示するエレメントタイプ(オブジェクトタイプ)で、以下の値:
Line 242: Line 244:  
if (! $res) die("Include of main fails");
 
if (! $res) die("Include of main fails");
 
</syntaxhighlight>
 
</syntaxhighlight>
As you can see, there are several tries to load the main.inc.php (or master.inc.php). The goal is to succeed in the most cases as possible. The minimum is 2 lines: one to try to load the master/main.inc.php into the dolibarr root directory and another one to try to load the file to support the case when the module is deployed into the "custom" directory. But you can have more to deal more situation. The provided example should be able to load the file main/master.inc.php in nearly all situation/setups.
+
ご覧のように、main.inc.php(または master.inc.php)のロードは何回か試行される。目標は、大抵のケースで成功すること。最小は2行: master/main.inc.phpをdolibarrルートディレクトリにロードしようとする行と、モジュールが "custom "ディレクトリにデプロイされるケースをサポートするためにファイルをロードしようとする行。しかし、より多くの状況に対応するため、より多くを持つことができる。提供された例は、ほぼすべての状況/セットアップで main/master.inc.php ファイルをロードできるはず。
   −
Note that you may add more "../" depending on the depth of the file relative to your module directory tree.
+
注意: モジュール・ディレクトリ・ツリーに対するファイルの深さによっては、さらに"../"を追加する。
   −
It's in the main.inc.php file that is loaded technical environment variables and permissions. The following variables are objects positioned in this file:
+
main.inc.phpファイルでは、技術上の環境変数とパーミッションを読み込む。以下の変数はこのファイルに配置されているオブジェクト:
   −
*$user    Object that contains the characteristics of the user + his permissions.
+
*$user    ユーザーの特徴とパーミッションを保持するオブジェクト。
*$conf    Object that contains Dolibarr configuration.
+
*$conf    Dolibarrの設定を保持するオブジェクト
*$db      Object that contains an opened connection handler to the database.
+
*$db      データベースへのオープンされた接続ハンドラを保持するオブジェクト。
*$langs  Object that contains the user's language.
+
*$langs  ユーザー言語を保持するオブジェクト。
   −
Then enter your code to display the page.
+
次にページを表示するために自前コードを入力する.
   −
*To include a class or library dedicated to the module is done using a Dolibarr function (and not using directly include_once):
+
*モジュール専用クラスやライブラリをインクルードするには、(include_onceを直接使わず)Dolibarr関数を使う:
    
''Example :''
 
''Example :''
Line 262: Line 264:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
*To include classes provided with Dolibarr, use the following syntax:
+
*Dolibarrで提供されているクラスをインクルードするには、以下の構文を使う:
    
''Example :''
 
''Example :''
Line 285: Line 287:  
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.
 
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.
   −
===Database access===
+
===データベース アクセス===
If you need to edit some data in the database inside your own table, use the PHP class generated before.
+
自前テーブルの中でデータベースのデータを編集する必要がある場合、前に生成されたPHPクラスを使うこと。
   −
If you to make access to tables with no dedicated PHP class available, this is always possible (for example if you want to get a list of records with a particular join or filter). In this case, this is a code samples to follow:
+
専用の PHP クラスがないテーブルにアクセスしたい場合 (たとえば、特定の結合やフィルタを使用したレコードの一覧を取得したい場合など) 、これはいつでも可能。この場合に、倣うべきコード例は:
   −
To make an insert, update or delete:
+
操作が、 insert, update または delete:
    
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
Line 299: Line 301:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
To read:
+
操作が read:
    
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
1,977

edits