Line 117:
Line 117:
此处 XXX 是extrafields代码
此处 XXX 是extrafields代码
−
==使用模型(propal等)时如何更改列的标签==
+
==如何在使用模板(propals等)时更改列的标签==
−
在模型的 PHP 代码中,您可以通过更改为名为“_tableau(...)”的函数来更改外字段的标签
+
在模板的PHP代码中,您可以通过修改名为“_tableau(...)”的函数来更改扩展字段的标签。
==在调用 $object->create() 或 $object->update()之前==
==在调用 $object->create() 或 $object->update()之前==
Line 128:
Line 128:
</syntaxhighlight>
</syntaxhighlight>
−
==内部编辑页面显示附加字段==
+
==在编辑页面中显示扩展字段==
−
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
Line 139:
Line 138:
</syntaxhighlight>
</syntaxhighlight>
−
==内部显示页面显示附加字段==
+
==在视图页面中显示扩展字段==
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
Line 149:
Line 148:
</syntaxhighlight>
</syntaxhighlight>
−
==对象类的 fetch 方法之后==
+
==在此对象类的Fetch方法之后==
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
Line 159:
Line 158:
</syntaxhighlight>
</syntaxhighlight>
−
==对象类的Update方法之后==
+
==在此对象类的Update方法之后==
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
// Actions on extra fields (by external module or standard code)
// Actions on extra fields (by external module or standard code)
Line 180:
Line 179:
</syntaxhighlight>
</syntaxhighlight>
−
==对象类的delete方法之后==
+
==在此对象类的Delete方法之后==
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
// Removed extrafields
// Removed extrafields
Line 197:
Line 196:
</syntaxhighlight>
</syntaxhighlight>
−
==管理页==
+
==管理页面==
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$elementtype='facture'; //Must be the $table_element of the class that manage extrafield
$elementtype='facture'; //Must be the $table_element of the class that manage extrafield
</syntaxhighlight>
</syntaxhighlight>
−
==修复数据库==
+
==恢复数据库==
−
Search and find definition of $listofmodulesextra add the new extrafield declaration
+
搜索并查找$listofmodulesextra的定义添加新的extrafield语句
+
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
$listofmodulesextra=array('societe'=>'societe','adherent'=>'adherent','product'=>'product',
$listofmodulesextra=array('societe'=>'societe','adherent'=>'adherent','product'=>'product',
Line 211:
Line 211:
</syntaxhighlight>
</syntaxhighlight>
−
==如何在使用模型时更改列的标签 (propals, etc.)==
+
==相关视频==
在该模型的PHP代码中,您可以通过"_tableau(...)"的函数来更改附加字段的标签。
在该模型的PHP代码中,您可以通过"_tableau(...)"的函数来更改附加字段的标签。