本文整理汇总了PHP中ZurmoHtml::getIdByName方法的典型用法代码示例。如果您正苦于以下问题:PHP ZurmoHtml::getIdByName方法的具体用法?PHP ZurmoHtml::getIdByName怎么用?PHP ZurmoHtml::getIdByName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZurmoHtml
的用法示例。
在下文中一共展示了ZurmoHtml::getIdByName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIdForHiddenSelectLinkField
protected function getIdForHiddenSelectLinkField()
{
return ZurmoHtml::getIdByName($this->getNameForHiddenSelectLinkField());
}
示例2: getEditableInputId
/**
* An input Id is typically formed like: modelClassName_attributeName or
* modelClassName_attributeName_relationAttributeName. This method resolves the input Id string.
* @param string $attributeName
* @param string $relationAttributeName
* @return string representing the content of the input id.
*/
protected function getEditableInputId($attributeName = null, $relationAttributeName = null)
{
assert('$attributeName == null || is_string($attributeName)');
assert('$relationAttributeName == null || is_string($relationAttributeName)');
if ($attributeName == null) {
$attributeName = $this->attribute;
}
$inputPrefix = $this->resolveInputIdPrefix();
$id = $inputPrefix . '_' . $attributeName;
if ($relationAttributeName != null) {
$id .= '_' . $relationAttributeName;
}
return ZurmoHtml::getIdByName($id);
}
示例3: renderAttributeNameSelectionContent
protected function renderAttributeNameSelectionContent(DropDownDependencyCustomFieldMapping $mapping)
{
$inputName = $this->formName . '[mappingData][' . $mapping->getPosition() . '][attributeName]';
$inputId = ZurmoHtml::getIdByName($inputName);
$htmlOptions = array();
$htmlOptions['id'] = $inputId;
if ($mapping->allowsAttributeSelection()) {
$htmlOptions['empty'] = Zurmo::t('Core', '(None)');
$data = $mapping->getAvailableCustomFieldAttributes();
} else {
$htmlOptions['empty'] = $mapping->getSelectHigherLevelFirstMessage();
$data = array();
}
Yii::app()->clientScript->registerScript('DropDownDependency' . $inputId, $this->renderAttributeDropDownOnChangeScript($inputId));
$content = ZurmoHtml::dropDownList($inputName, $mapping->getAttributeName(), $data, $htmlOptions);
return $content;
}