本文整理汇总了PHP中CustomField::modifyForm方法的典型用法代码示例。如果您正苦于以下问题:PHP CustomField::modifyForm方法的具体用法?PHP CustomField::modifyForm怎么用?PHP CustomField::modifyForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CustomField
的用法示例。
在下文中一共展示了CustomField::modifyForm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: modifyForm
function modifyForm()
{
global $itemfield_typ, $gorumroll, $lll, $jQueryLib;
$this->id = $gorumroll->rollid;
if (!Roll::isPreviousFormSubmitInvalid()) {
$ret = $this->load();
}
// hogy ezek ne legyenek a formban, mikor egy global common field-et nezunk:
if ($this->isCommon && !$this->cid) {
$fieldsToLeaveOut = array("detailsProperties", "showInDetails", "formProperties", "expl", "default_text", "mandatory", "allowHtml");
foreach ($fieldsToLeaveOut as $attr) {
$itemfield_typ["attributes"][$attr][] = "form invisible";
}
// hogy a customfield.js-ben a feltetelek jol mukodjenek:
$fieldsToMakeHidden = array("type", "subType");
foreach ($fieldsToMakeHidden as $attr) {
$itemfield_typ["attributes"][$attr][] = "form hidden";
}
}
JavaScript::addInclude(GORUM_JS_DIR . $jQueryLib);
JavaScript::addInclude(GORUM_JS_DIR . "/jquery/jquery.center.js");
// to center the loading animation image
JavaScript::addInclude(GORUM_JS_DIR . "/jquery/field.js");
// to retrieve the form field values
// Propagate into all other categories:
$propagatePostfix = OverlayController::addPropagateOverlay($this->id);
// Propagate into the subcategories only:
if ($this->cid) {
getDbCount($count, array("SELECT COUNT(*) FROM @category WHERE up=#cid#", $this->cid));
if ($count) {
$propagatePostfix .= " " . OverlayController::addPropagateOverlay($this->id, "", "_subcat");
}
}
foreach (array_keys($itemfield_typ["attributes"]) as $attr) {
if (!in_array($attr, array("name", "isCommon", "type", "userField"))) {
if (isset($lll["itemfield_{$attr}"])) {
$lll["itemfield_{$attr}"] .= $propagatePostfix;
} elseif (isset($lll["customfield_{$attr}"])) {
$lll["customfield_{$attr}"] .= $propagatePostfix;
}
}
}
parent::modifyForm();
}