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


PHP X2Html::openTag方法代码示例

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


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

示例1: renderInput

 /**
  * @param type $fieldName
  * @param type $htmlOptions
  */
 public function renderInput($fieldName, $htmlOptions = array())
 {
     switch ($fieldName) {
         case 'color':
             $field = $this->getField($fieldName);
             $options = Dropdowns::getItems($field->linkType, null, false);
             $enableDropdownLegend = Yii::app()->settings->enableColorDropdownLegend;
             if ($enableDropdownLegend) {
                 $htmlOptions['options'] = array();
                 foreach ($options as $value => $label) {
                     $brightness = X2Color::getColorBrightness($value);
                     $fontColor = $brightness > 127.5 ? 'black' : 'white';
                     $htmlOptions['options'][$value] = array('style' => 'background-color: ' . $value . ';
                              color: ' . $fontColor);
                 }
             }
             return CHtml::activeDropDownList($this, $field->fieldName, $options, $htmlOptions);
         case 'priority':
             return CHtml::activeDropdownList($this, 'priority', self::getPriorityLabels());
         case 'associationType':
             return X2Html::activeMultiTypeAutocomplete($this, 'associationType', 'associationId', array('calendar' => Yii::t('app', 'Select an option')) + X2Model::getAssociationTypeOptions());
         case 'reminder':
             $reminderInput = parent::renderInput($fieldName, array('class' => 'reminder-checkbox'));
             $reminderInput .= X2Html::openTag('div', X2Html::mergeHtmlOptions($htmlOptions, array('class' => 'reminder-config'))) . Yii::t('actions', 'Create a notification reminder for {user} {time} before this {action} ' . 'is due', array('{user}' => CHtml::activeDropDownList($this, 'notificationUsers', array('me' => Yii::t('actions', 'me'), 'assigned' => Yii::t('actions', 'the assigned user'), 'both' => Yii::t('actions', 'me and the assigned user'))), '{time}' => CHtml::activeDropDownList($this, 'notificationTime', array(1 => Yii::t('actions', '1 minute'), 5 => Yii::t('actions', '5 minutes'), 10 => Yii::t('actions', '10 minutes'), 15 => Yii::t('actions', '15 minutes'), 30 => Yii::t('actions', '30 minutes'), 60 => Yii::t('actions', '1 hour'), 1440 => Yii::t('actions', '1 day'), 10080 => Yii::t('actions', '1 week'))), '{action}' => lcfirst(Modules::displayName(false, 'Actions')))) . '</div>';
             return $reminderInput;
         default:
             return parent::renderInput($fieldName, $htmlOptions);
     }
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:33,代码来源:Actions.php

示例2: renderTopLabel

 /**
  * Renders the top label type. 
  * Renders the label in it's own row, 
  * increases colspan to 2
  * @param  [type] $item  [description]
  * @param  [type] $field [description]
  * @return [type]        [description]
  */
 public function renderTopLabel($item, $field)
 {
     $html = '';
     $html .= '<tr class="formItem topLabel">';
     $html .= "<td class='label' colspan='2'>";
     $html .= $this->renderLabel($field);
     $html .= '</td>';
     $html .= '</tr>';
     $html .= X2Html::openTag('tr', $this->getItemOptions($item, $field));
     $html .= $this->renderNoneLabel($item, $field);
     return $html;
 }
开发者ID:shuvro35,项目名称:X2CRM,代码行数:20,代码来源:RecordView.php

示例3: renderInput

 /**
  * renders the hidden input for an attribute
  * @param  [type] $item  [description]
  * @param  [type] $field [description]
  * @return [type]        [description]
  */
 public function renderInput($item, $field)
 {
     $html = X2Html::openTag('span', array('class' => 'model-input', 'id' => $field->modelName . '_' . $field->fieldName . '_field-input', 'style' => 'display:none'));
     $html .= $this->model->renderInput($field->fieldName, array('tabindex' => $item['tabindex'], 'disabled' => $item['readOnly'] ? 'disabled' : ''));
     $html .= '</span>';
     return $html;
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:13,代码来源:DetailView.php

示例4: array

 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley,
 * California 95067, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * 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".
 *****************************************************************************************/
// individual square for MediaSelector.php
$htmlOptions = array('class' => 'media-square', 'data-id' => $data->id, 'data-name' => $data->name, 'data-url' => $data->getPublicUrl());
if (isset($template) && $template) {
    $htmlOptions['class'] .= ' template';
}
echo X2Html::openTag('div', $htmlOptions);
echo X2Html::image($data->getPublicUrl(), $data->name, array('width' => 100));
echo '</div>';
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:mediaSquare.php

示例5: unset

 * You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley,
 * California 95067, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * 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".
 *****************************************************************************************/
$class = "x2-tour " . $htmlOptions['class'];
unset($htmlOptions['class']);
echo X2Html::openTag('div', array_merge(array('data-id' => $tour->id, 'class' => $class), $htmlOptions));
?>
	<?php 
if ($title) {
    ?>
	<div class='title'>
		<h2><?php 
    echo $title;
    ?>
</h2>
	</div>
	<?php 
}
?>
	
	<div class="inner">
开发者ID:tymiles003,项目名称:X2CRM,代码行数:31,代码来源:tour.php

示例6: 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;
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:17,代码来源:FormView.php

示例7: renderThemeColorSelector

 public static function renderThemeColorSelector($label, $key, $value, $htmlOptions = array(), $disabled = false)
 {
     $htmlOptions = X2Html::mergeHtmlOptions(array('class' => 'row theme-color-selector'), $htmlOptions);
     echo X2Html::openTag('div', $htmlOptions);
     echo "\n                <label>\n                    " . CHtml::encode($label) . "\n                </label>\n                <input type='text' name='preferences[{$key}]' id='preferences_{$key}' value='{$value}'\n                 class='color-picker-input theme-attr' " . ($disabled ? 'disabled="disabled"' : '') . "> \n                </input>\n              </div>";
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:6,代码来源:ThemeGenerator.php

示例8: array

    ?>
    <div class='file-uploader-buttons <?php 
    echo $padding;
    ?>
'>
        <span class='x2-button x2-blue show-button' id="<?php 
    echo $this->id . '-button';
    ?>
"> <?php 
    echo $buttonText;
    ?>
</span>
    </div>
<?php 
}
echo X2Html::openTag('div', array('class' => "file-uploader {$class} {$padding}", 'id' => $this->id, 'style' => $open ? '' : 'display:none'));
?>
    <form id='options'>
        <span>
            <input type='checkbox' id='file-uploader-private' name='private' />
            <label for='file-uploader-private'><?php 
echo Yii::t('app', 'Private');
?>
</label>
        </span>
        <?php 
if ($this->googleDrive) {
    ?>
            <span>
                <input type='checkbox' id='file-uploader-drive' name='drive' />
                <label for='file-uploade-rdrive'><?php 
开发者ID:tymiles003,项目名称:X2CRM,代码行数:31,代码来源:fileUploader.php


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