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


PHP Apartment::getTip方法代码示例

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


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

示例1: renderFormRows

 public static function renderFormRows($rows, Apartment $model)
 {
     if (!$rows) {
         return '';
     }
     //print_r($rows);
     $isShowTip = true;
     foreach ($rows as $row) {
         if (!$model->canShowInForm($row['field'])) {
             continue;
         }
         // если есть файл отображения для формы
         if ($row['standard_type'] == FormDesigner::STANDARD_TYPE_ORIGINAL_VIEW) {
             Yii::app()->controller->renderPartial('//../views/common/apartments/backend/fields/' . $row['field'], array('model' => $model));
             continue;
         }
         $required = $row->rules == FormDesigner::RULE_REQUIRED || $row->rules == FormDesigner::RULE_REQUIRED_NUMERICAL ? array('required' => true) : array();
         echo '<div class="rowold">';
         if ($row['standard_type'] == FormDesigner::STANDARD_TYPE_NEW) {
             echo CHtml::label($row['label_' . Yii::app()->language], get_class($model) . '_' . $row['field'], $required);
         } else {
             echo $row['is_i18n'] ? '' : CHtml::activeLabel($model, $row['field']);
         }
         if ($row['is_i18n']) {
             $isShowTip = false;
         }
         if ($isShowTip) {
             echo Apartment::getTip($row['field']);
         }
         switch ($row['type']) {
             case FormDesigner::TYPE_TEXT:
                 if ($row['is_i18n']) {
                     Yii::app()->controller->widget('application.modules.lang.components.langFieldWidget', array('model' => $model, 'field' => $row['field'], 'type' => 'string'));
                 } else {
                     echo CHtml::activeTextField($model, $row['field'], array('class' => 'width500', 'maxlength' => 255));
                 }
                 break;
             case FormDesigner::TYPE_INT:
                 echo CHtml::activeTextField($model, $row['field'], array('class' => 'width70', 'maxlength' => 255));
                 if ($row->measure_unit) {
                     echo '&nbsp;' . $row->measure_unit;
                 }
                 break;
             case FormDesigner::TYPE_TEXT_AREA:
                 if ($row['is_i18n']) {
                     Yii::app()->controller->widget('application.modules.lang.components.langFieldWidget', array('model' => $model, 'field' => $row['field'], 'type' => 'text'));
                 } else {
                     echo CHtml::activeTextArea($model, $row['field'], array('class' => 'width500 height200'));
                 }
                 break;
             case FormDesigner::TYPE_TEXT_AREA_WS:
                 if ($row['is_i18n']) {
                     Yii::app()->controller->widget('application.modules.lang.components.langFieldWidget', array('model' => $model, 'field' => $row['field'], 'type' => 'text-editor'));
                 } else {
                     // даем пользователям ограниченый набор форматирования
                     $toolbar = array(array('Source', '-', 'Bold', 'Italic', 'Underline', 'Strike'), array('NumberedList', 'BulletedList', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'));
                     $filebrowserImageUploadUrl = '';
                     if (Yii::app()->user->checkAccess('backend_access')) {
                         // if admin - enable upload image
                         $filebrowserImageUploadUrl = Yii::app()->createAbsoluteUrl('/site/uploadimage', array('type' => 'imageUpload', Yii::app()->request->csrfTokenName => Yii::app()->request->csrfToken));
                         $toolbar = array(array('Source', '-', 'Bold', 'Italic', 'Underline', 'Strike'), array('Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'), array('NumberedList', 'BulletedList', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'), array('Styles', 'Format', 'Font', 'FontSize', 'TextColor', 'BGColor'), array('Image', 'Link', 'Unlink', 'SpecialChar'));
                     }
                     Yii::app()->controller->widget('application.extensions.editMe.widgets.ExtEditMe', array('model' => $model, 'attribute' => $row['field'], 'toolbar' => $toolbar, 'filebrowserImageUploadUrl' => $filebrowserImageUploadUrl, 'htmlOptions' => array('id' => $model->id)));
                 }
                 break;
             case FormDesigner::TYPE_REFERENCE:
                 echo CHtml::activeDropDownList($model, $row['field'], CMap::mergeArray(array("" => Yii::t('common', 'Please select')), FormDesigner::getListByCategoryID($row->reference_id)));
                 break;
         }
         echo '</div>';
     }
 }
开发者ID:barricade86,项目名称:raui,代码行数:72,代码来源:HFormEditor.php

示例2: array

<?php

if ($model->canShowInForm('berths')) {
    ?>
    <div class="rowold">
        <?php 
    echo CHtml::activeLabelEx($model, 'berths');
    ?>
        <?php 
    echo Apartment::getTip('berths');
    ?>
        <?php 
    echo CHtml::activeTextField($model, 'berths', array('class' => 'width150', 'maxlength' => 255));
    ?>
        <?php 
    echo CHtml::error($model, 'berths');
    ?>
    </div>
<?php 
}
开发者ID:barricade86,项目名称:raui,代码行数:20,代码来源:berths.php

示例3: range

<?php

if ($model->canShowInForm('num_of_rooms')) {
    ?>
    <div class="rowold">
        <?php 
    echo CHtml::activeLabelEx($model, 'num_of_rooms');
    ?>
        <?php 
    echo Apartment::getTip('num_of_rooms');
    ?>
        <?php 
    echo CHtml::activeDropDownList($model, 'num_of_rooms', array_merge(array(0 => ''), range(1, param('moduleApartments_maxRooms', 8))), array('class' => 'width50'));
    ?>
        <?php 
    echo CHtml::error($model, 'num_of_rooms');
    ?>
    </div>
    <div class="clear5"></div>
<?php 
}
开发者ID:barricade86,项目名称:raui,代码行数:21,代码来源:num_of_rooms.php

示例4: array

    echo $form->error($model, 'square');
    ?>
    </div>
<?php 
}
?>

<?php 
if ($model->canShowInForm('land_square')) {
    ?>
    <div class="rowold">
        <?php 
    echo $form->labelEx($model, 'land_square');
    ?>
        <?php 
    echo Apartment::getTip('land_square');
    ?>
        <?php 
    echo $form->textField($model, 'land_square', array('size' => 5, 'class' => 'width70')) . ' ' . tc('site_land_square');
    ?>
        <?php 
    echo $form->error($model, 'land_square');
    ?>
    </div>
<?php 
}
?>

<?php 
if ($model->type == Apartment::TYPE_CHANGE) {
    echo '<div class="clear">&nbsp;</div>';
开发者ID:alexjkitty,项目名称:estate,代码行数:31,代码来源:__form_general.php

示例5: genContentTab

 private function genContentTab($field, $lang)
 {
     $isCKEditor = $this->type == 'text-editor' ? 1 : 0;
     $fieldId = 'id_' . $this->modelName . $this->field . '_' . $lang;
     $html = '';
     if ($this->useTranslate) {
         $html .= '<div class="translate_button" >';
         $html .= '<span class="t_loader_' . $this->modelName . $this->field . '" style="display: none;"><img src="' . Yii::app()->request->baseUrl . '/images/ajax-loader.gif" alt="Переводим"></span>';
         $html .= CHtml::button(tc('Translate'), array('onClick' => "translateField('{$this->field}', '{$lang}', '{$isCKEditor}', '" . $this->modelName . "')"));
         $html .= '</div>';
     }
     if ($this->useCopyButton) {
         $html .= '<div class="copylang_button">';
         $html .= CHtml::button(tc('Copy to all languages'), array('onClick' => "copyField('{$this->field}', '{$lang}', '{$isCKEditor}', '" . $this->modelName . "')"));
         $html .= '</div>';
     }
     $html .= '<div class="rowold">';
     $html .= CHtml::activeLabel($this->model, $this->field, array('required' => $this->model->isLangAttributeRequired($this->field)));
     $html .= Apartment::getTip($this->field);
     if ($this->note) {
         $html .= CHtml::tag('p', array('class' => 'note'), $this->note);
     }
     switch ($this->type) {
         case 'string':
             $html .= CHtml::activeTextField($this->model, $field, array('class' => 'width500', 'maxlength' => 255, 'id' => $fieldId));
             break;
         case 'text':
             $html .= CHtml::activeTextArea($this->model, $field, array('class' => 'width500 height200', 'id' => $fieldId));
             break;
         case 'text-editor':
             $html .= '<div class="clear"></div>';
             $options = array();
             if (Yii::app()->user->getState('isAdmin')) {
                 // if admin - enable upload image
                 $options = array('filebrowserUploadUrl' => Yii::app()->createAbsoluteUrl('/site/uploadimage', array('type' => 'imageUpload', Yii::app()->request->csrfTokenName => Yii::app()->request->csrfToken)));
                 $options['allowedContent'] = true;
             }
             $html .= $this->widget('application.extensions.ckeditor.CKEditor', array('model' => $this->model, 'attribute' => $field, 'language' => '' . Yii::app()->language . '', 'editorTemplate' => 'advanced', 'skin' => 'kama', 'toolbar' => array(array('Source', '-', 'Bold', 'Italic', 'Underline', 'Strike'), array('Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'), array('NumberedList', 'BulletedList', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'), array('Styles', 'Format', 'Font', 'FontSize', 'TextColor', 'BGColor'), array('Image', 'Link', 'Unlink', 'SpecialChar')), 'options' => $options, 'htmlOptions' => array('id' => $fieldId)), true);
             break;
     }
     $html .= CHtml::error($this->model, $field);
     $html .= '</div>';
     $this->fieldIdArr[$lang] = $fieldId;
     return $html;
 }
开发者ID:alexjkitty,项目名称:estate,代码行数:45,代码来源:langFieldWidget.php

示例6: array

<?php

if ($model->canShowInForm('window_to')) {
    ?>
    <div class="rowold">
        <?php 
    echo CHtml::activeLabelEx($model, 'window_to');
    ?>
        <?php 
    echo Apartment::getTip('window_to');
    ?>
        <?php 
    echo CHtml::activeDropDownList($model, 'window_to', WindowTo::getWindowTo(), array('class' => 'width150'));
    ?>
        <?php 
    echo CHtml::error($model, 'window_to');
    ?>
    </div>
<?php 
}
开发者ID:barricade86,项目名称:raui,代码行数:20,代码来源:window_to.php

示例7: array

    <div class="rowold">
        <?php 
    echo CHtml::activeLabelEx($model, 'floor', array('class' => 'noblock'));
    ?>
 /
        <?php 
    echo CHtml::activeLabelEx($model, 'floor_total', array('class' => 'noblock'));
    ?>
<br/>
        <?php 
    echo Apartment::getTip('floor_all');
    ?>
        <?php 
    echo CHtml::activeDropDownList($model, 'floor', array_merge(array('0' => ''), range(1, param('moduleApartments_maxFloor', 30))), array('class' => 'width50'));
    ?>
 /
        <?php 
    echo CHtml::activeDropDownList($model, 'floor_total', array_merge(array('0' => ''), range(1, param('moduleApartments_maxFloor', 30))), array('class' => 'width50'));
    ?>
        <?php 
    echo CHtml::error($model, 'floor');
    ?>
        <?php 
    echo CHtml::error($model, 'floor_total');
    ?>
        <?php 
    echo Apartment::getTip('floor_all');
    ?>
    </div>
<?php 
}
开发者ID:barricade86,项目名称:raui,代码行数:31,代码来源:floor_all.php

示例8: array

}
?>

	<?php 
if ($model->canShowInForm('description_near')) {
    $this->widget('application.modules.lang.components.langFieldWidget', array('model' => $model, 'field' => 'description_near', 'type' => 'text'));
    echo '<div class="clear">&nbsp;</div>';
}
if ($model->canShowInForm('phone')) {
    echo $form->label($model, 'phone');
    echo Apartment::getTip('phone');
    echo $form->textField($model, 'phone');
}
if ($model->canShowInForm('note')) {
    echo $form->label($model, 'note');
    echo Apartment::getTip('note');
    echo $form->textArea($model, 'note', array('class' => 'width500'));
}
if (issetModule('formeditor')) {
    Yii::import('application.modules.formeditor.models.HFormEditor');
    $rows = HFormEditor::getExtendedFields();
    HFormEditor::renderFormRows($rows, $model);
}
?>

</div>

	<?php 
/*if ($model->isNewRecord) {
		echo '<p>' . tt('After pressing the button "Create", you will be able to load photos for the listing and to mark the property on the map.', 'apartments') . '</p>';
	}*/
开发者ID:alexjkitty,项目名称:estate,代码行数:31,代码来源:__form.php


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