本文整理汇总了PHP中X2Model::renderMergeInput方法的典型用法代码示例。如果您正苦于以下问题:PHP X2Model::renderMergeInput方法的具体用法?PHP X2Model::renderMergeInput怎么用?PHP X2Model::renderMergeInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类X2Model
的用法示例。
在下文中一共展示了X2Model::renderMergeInput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/* set value of field to label if this is an inline
labeled field */
if (empty($model->{$fieldName}) && $labelType == 'inline') {
$model->{$fieldName} = $field->attributeLabel;
}
if ($field->type === 'text') {
$textFieldHeight = $item['height'] . 'px';
}
$item['height'] = 'auto';
$htmlString .= '<div class="formItem ' . $labelClass . '">';
$htmlString .= $form->labelEx($model, $field->fieldName);
$htmlString .= '<div class="formInputBox"
style="width:' . $item['width'] . 'px;height:' . $item['height'] . ';">';
$default = $model->{$fieldName} == $field->attributeLabel;
if (isset($idArray)) {
$htmlString .= X2Model::renderMergeInput($modelName, $idArray, $field);
} else {
if (isset($specialFields[$fieldName])) {
$htmlString .= $specialFields[$fieldName];
} else {
$htmlString .= $model->renderInput($fieldName, array('tabindex' => isset($item['tabindex']) ? $item['tabindex'] : null, 'disabled' => $item['readOnly'] ? 'disabled' : null, 'style' => $field->type === 'text' ? 'height: ' . $textFieldHeight : ''));
}
}
$htmlString .= "</div>";
if ($field->type === 'link' && !$suppressQuickCreate && isset($modelsWhichSupportQuickCreate[$field->linkType])) {
$htmlString .= '<span class="quick-create-button create-' . $field->linkType . '">+</span>';
$quickCreateButtonTypes[] = $field->linkType;
}
}
}
unset($item);
示例2: renderAttribute
public function renderAttribute($item, Fields $field)
{
$fieldName = preg_replace('/^formItem_/u', '', $item['name']);
$html = X2Html::openTag('div', array('class' => "formInputBox"));
if (isset($this->idArray)) {
$html .= X2Model::renderMergeInput($this->modelName, $this->idArray, $field);
} else {
if (isset($this->specialFields[$fieldName])) {
$html .= $this->specialFields[$fieldName];
} else {
$html .= $this->model->renderInput($fieldName, array('tabindex' => $item['tabindex'], 'disabled' => $item['readOnly'], 'style' => $item['height'], 'id' => $this->namespace . X2Html::resolveId($this->model, $fieldName)));
}
}
$html .= '</div>';
$html .= $this->renderExtra($field);
return $html;
}