本文整理汇总了PHP中ZurmoHtml::Tag方法的典型用法代码示例。如果您正苦于以下问题:PHP ZurmoHtml::Tag方法的具体用法?PHP ZurmoHtml::Tag怎么用?PHP ZurmoHtml::Tag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZurmoHtml
的用法示例。
在下文中一共展示了ZurmoHtml::Tag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderContent
/**
* @return string
*/
protected function renderContent()
{
$sqlContent = ZurmoHtml::Tag('h3', array(), Zurmo::t('ReportsModule', 'Count Query'));
$sqlContent .= $this->dataProvider->makeTotalCountSqlQueryForDisplay();
$content = ZurmoHtml::tag('div', array(), $sqlContent);
$sqlContent = ZurmoHtml::Tag('h3', array(), Zurmo::t('ReportsModule', 'Grid Query'));
$sqlContent .= $this->dataProvider->makeSqlQueryForDisplay();
$content .= ZurmoHtml::tag('div', array(), $sqlContent);
return $content;
}
示例2: renderControlEditable
/**
* @return The element's content as a string.
*/
protected function renderControlEditable()
{
$firstValueSpanAreaId = $this->getFirstValueEditableInputId() . '-first-value-area';
$secondValueSpanAreaId = $this->getSecondValueEditableInputId() . '-second-value-area';
$startingDivStyleFirstValue = null;
$startingDivStyleSecondValue = null;
if (in_array($this->getOperator(), array(OperatorRules::TYPE_IS_NULL, OperatorRules::TYPE_IS_NOT_NULL, OperatorRules::TYPE_CHANGES, OperatorRules::TYPE_DOES_NOT_CHANGE, OperatorRules::TYPE_IS_EMPTY, OperatorRules::TYPE_IS_NOT_EMPTY))) {
$startingDivStyleFirstValue = "display:none;";
}
if ($this->getOperator() != OperatorRules::TYPE_BETWEEN) {
$startingDivStyleSecondValue = "display:none;";
}
$content = ZurmoHtml::tag('div', array('id' => $firstValueSpanAreaId, 'class' => 'first-value-area', 'style' => $startingDivStyleFirstValue), $this->renderEditableFirstValueContent());
$content .= ZurmoHtml::tag('div', array('id' => $secondValueSpanAreaId, 'class' => 'second-value-area', 'style' => $startingDivStyleSecondValue), ZurmoHtml::Tag('span', array('class' => 'dynamic-and-for-mixed'), Zurmo::t('Core', 'and')) . $this->renderEditableSecondValueContent());
return $content;
}
示例3: renderControlEditable
/**
* Render a date JUI widget
* @return The element's content as a string.
*/
protected function renderControlEditable()
{
$valueTypeId = $this->getValueTypeEditableInputId();
$firstDateSpanAreaSuffix = '-first-date-area';
$secondDateSpanAreaSuffix = '-second-date-area';
$firstDateSpanAreaId = $valueTypeId . $firstDateSpanAreaSuffix;
$secondDateSpanAreaId = $valueTypeId . $secondDateSpanAreaSuffix;
$valueTypesRequiringFirstDateInput = MixedDateTypesSearchFormAttributeMappingRules::getValueTypesRequiringFirstDateInput();
$valueTypesRequiringSecondDateInput = MixedDateTypesSearchFormAttributeMappingRules::getValueTypesRequiringSecondDateInput();
Yii::app()->clientScript->registerScript('mixedDateTypes', "\n \$('.dateValueType').change( function()\n {\n arr = " . CJSON::encode($valueTypesRequiringFirstDateInput) . ";\n arr2 = " . CJSON::encode($valueTypesRequiringSecondDateInput) . ";\n firstDateSpanAreaQualifier = '#' + \$(this).attr('id') + '" . $firstDateSpanAreaSuffix . "';\n secondDateSpanAreaQualifier = '#' + \$(this).attr('id') + '" . $secondDateSpanAreaSuffix . "';\n if (\$.inArray(\$(this).val(), arr) != -1)\n {\n \$(firstDateSpanAreaQualifier).show();\n \$(firstDateSpanAreaQualifier).find('.hasDatepicker').prop('disabled', false);\n }\n else\n {\n \$(firstDateSpanAreaQualifier).hide();\n \$(firstDateSpanAreaQualifier).find('.hasDatepicker').prop('disabled', true);\n }\n if (\$.inArray(\$(this).val(), arr2) != -1)\n {\n \$(secondDateSpanAreaQualifier).show();\n \$(secondDateSpanAreaQualifier).find('.hasDatepicker').prop('disabled', false);\n }\n else\n {\n \$(secondDateSpanAreaQualifier).hide();\n \$(secondDateSpanAreaQualifier).find('.hasDatepicker').prop('disabled', true);\n }\n }\n );\n ");
$startingDivStyleFirstDate = null;
$startingDivStyleSecondDate = null;
if (!in_array($this->getValueType(), $valueTypesRequiringFirstDateInput)) {
$startingDivStyleFirstDate = "display:none;";
$firstDateDisabled = 'disabled';
} else {
$firstDateDisabled = null;
}
if (!in_array($this->getValueType(), $valueTypesRequiringSecondDateInput)) {
$startingDivStyleSecondDate = "display:none;";
$secondDateDisabled = 'disabled';
} else {
$secondDateDisabled = null;
}
$content = ZurmoHtml::tag('span', array('id' => $firstDateSpanAreaId, 'class' => 'first-date-area', 'style' => $startingDivStyleFirstDate), $this->renderEditableFirstDateContent($firstDateDisabled));
$content .= ZurmoHtml::tag('span', array('id' => $secondDateSpanAreaId, 'class' => 'second-date-area', 'style' => $startingDivStyleSecondDate), ZurmoHtml::Tag('span', array('class' => 'dynamic-and-for-mixed'), Zurmo::t('Core', 'and')) . $this->renderEditableSecondDateContent($secondDateDisabled));
return $content;
}