本文整理匯總了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;
}