當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。