当前位置: 首页>>代码示例>>PHP>>正文


PHP X2Model::renderModelInput方法代码示例

本文整理汇总了PHP中X2Model::renderModelInput方法的典型用法代码示例。如果您正苦于以下问题:PHP X2Model::renderModelInput方法的具体用法?PHP X2Model::renderModelInput怎么用?PHP X2Model::renderModelInput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在X2Model的用法示例。


在下文中一共展示了X2Model::renderModelInput方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderInput

 public function renderInput($fieldName, $htmlOptions = array())
 {
     $field = $this->getField($fieldName);
     if (!$field) {
         return;
     }
     if (isset($this->inputRenderer) && $this->inputRenderer instanceof FieldInputRenderer) {
         // check if there's a renderer for this field type
         if ($input = $this->inputRenderer->renderInput($field, $htmlOptions)) {
             return $input;
         }
     }
     return X2Model::renderModelInput($this->owner, $field, $htmlOptions);
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:14,代码来源:X2StaticFieldsBehavior.php

示例2: renderContactFields

 public function renderContactFields($model)
 {
     $defaultFields = X2Model::model('Fields')->findAllByAttributes(array('modelName' => 'Contacts'), array('condition' => "fieldName IN ('firstName', 'lastName', 'email', 'phone')"));
     $requiredFields = X2Model::model('Fields')->findAllByAttributes(array('modelName' => 'Contacts', 'required' => 1), array('condition' => "fieldName NOT IN ('firstName', 'lastName', 'phone', 'email', 'visibility')"));
     $i = 0;
     $fields = array_merge($requiredFields, $defaultFields);
     foreach ($fields as $field) {
         if ($field->type === 'boolean') {
             $class = "";
             echo "<div>";
         } else {
             $class = $field->fieldName === 'firstName' || $field->fieldName === 'lastName' ? 'quick-contact-narrow' : 'quick-contact-wide';
         }
         $htmlAttr = array('class' => $class, 'tabindex' => 100 + $i, 'title' => $field->attributeLabel, 'id' => 'quick_create_' . $field->modelName . '_' . $field->fieldName);
         if ($field->type === 'boolean') {
             echo CHtml::label($field->attributeLabel, $htmlAttr['id']);
         }
         echo X2Model::renderModelInput($model, $field, $htmlAttr);
         if ($field->type === 'boolean') {
             echo "</div>";
         }
         ++$i;
     }
 }
开发者ID:dsyman2,项目名称:X2CRM,代码行数:24,代码来源:QuickContact.php

示例3: array

</div></div><?php 
        echo '<br />';
        echo CHtml::activeLabel($model, 'data');
        echo CHtml::activeTextArea($model, 'data', array('id' => 'custom-field-template'));
        echo '<br />' . Yii::t('admin', 'The template defines how the field will be displayed in X2Engine. The type defines how to interpret the template. If the type is Formula, it will be interpreted as an X2Workflow formula.');
        echo '<br /><br />';
        break;
}
if ($model->type != 'timerSum') {
    $dummyFieldName = 'customized_field';
    foreach ($model->getErrors('defaultValue') as $index => $message) {
        $dummyModel->addError('customized_field', $message);
    }
    echo CHtml::label($model->getAttributeLabel('defaultValue'), CHtml::resolveName($dummyModel, $dummyFieldName));
    $model->fieldName = 'customized_field';
    echo X2Model::renderModelInput($dummyModel, $model, array('id' => 'defaultValue-input-' . $model->type));
    echo CHtml::error($dummyModel, 'customized_field');
}
echo "<script id=\"input-clientscript-" . time() . "\">\n";
Yii::app()->clientScript->echoScripts();
echo "\n</script>";
?>
            </div>
        <br>

        <?php 
if ($model->type != 'timerSum') {
    ?>
            <div class="row">
                <?php 
    echo $form->checkBox($model, 'required', array('id' => 'required'));
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:createUpdateField.php

示例4: renderAssignment

 public function renderAssignment($field, array $htmlOptions = array())
 {
     // enables custom multi-select menu for non-phonegap x2touch. Not needed for phonegap since
     // it uses a native multiselct
     if ($field->linkType === 'multiple' && !Yii::app()->params->isPhoneGap) {
         $htmlOptions['data-native-menu'] = 'false';
     }
     return X2Model::renderModelInput($this->owner, $field, $htmlOptions);
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:9,代码来源:MobileFieldInputRenderer.php

示例5: array

 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 *****************************************************************************************/
Yii::app()->clientScript->registerScriptFile(Yii::app()->controller->module->assetsUrl . '/js/SettingsController.js');
$this->onPageLoad("function () {\n    x2.main.controllers['{$this->pageId}'] = new x2.SettingsController (" . CJSON::encode(array('translations' => array('changeUrlMessage' => Yii::t('app', 'Performing this action will log you out of X2CRM.'), 'changeUrlTitle' => 'Change web address?', 'changeUrlButtonConfirm' => 'Okay', 'changeUrlButtonCancel' => 'Back'))) . ");\n}");
?>

<div class='detail-view'>
<?php 
$form = $this->beginWidget('MobileActiveForm');
?>
    <div class="field-container">
        <div class="field-label"><?php 
echo CHtml::encode($profile->getField('language')->attributeLabel);
?>
</div>
        <div class="field-value">
        <?php 
echo X2Model::renderModelInput($profile, $profile->getField('language'), array('class' => 'profile-language'));
?>
        </div>
    </div>
    <?php 
$this->endWidget();
?>
</div>
开发者ID:dsyman2,项目名称:X2CRM,代码行数:30,代码来源:settings.php


注:本文中的X2Model::renderModelInput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。