本文整理匯總了PHP中Alias::getCascades方法的典型用法代碼示例。如果您正苦於以下問題:PHP Alias::getCascades方法的具體用法?PHP Alias::getCascades怎麽用?PHP Alias::getCascades使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Alias
的用法示例。
在下文中一共展示了Alias::getCascades方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: parsePages
//.........這裏部分代碼省略.........
$strValue = $objElement->getValueByTemplateField($objField->getId());
}
$strDescription = $objField->getDescription();
//*** Get the field type object.
$objType = TemplateFieldType::selectByPK($objField->getTypeId());
$intMaxFileCount = null;
switch ($objField->getTypeId()) {
case FIELD_TYPE_DATE:
$objFieldTpl->addBlockfile('ELEMENT_FIELD', 'field.date', 'elementfield_date.tpl.htm');
foreach ($objContentLangs as $objContentLanguage) {
$objFieldTpl->setCurrentBlock("field.{$objType->getInput()}.value");
$objFieldTpl->setVariable("FIELD_LANGUAGE_ID", "efv_{$objField->getId()}_{$objContentLanguage->getId()}");
if (is_object($objElement)) {
$strValue = $objElement->getValueByTemplateField($objField->getId(), $objContentLanguage->getId(), true);
$strValue = Date::fromMysql($_CONF['app']['universalDate'], $strValue);
} else {
$strValue = "";
}
$objFieldTpl->setVariable("FIELD_LANGUAGE_VALUE", htmlspecialchars($strValue));
$objFieldTpl->parseCurrentBlock();
}
$objValue = $objField->getValueByName("tfv_field_format");
$strFormatValue = is_object($objValue) ? $objValue->getValue() : "";
$objFieldTpl->setCurrentBlock("field.date");
$objFieldTpl->setVariable("FIELD_ID", "efv_{$objField->getId()}");
if ($objField->getRequired()) {
$objFieldTpl->setVariable("FIELD_REQUIRED", "* ");
}
$objFieldTpl->setVariable("FIELD_DATE_FORMAT", $strFormatValue);
$objFieldTpl->setVariable("FIELD_NAME", html_entity_decode($objField->getName()));
if (is_object($objElement)) {
$objElementField = $objElement->getFieldByTemplateField($objField->getId());
if (is_object($objElementField)) {
$objFieldTpl->setVariable("FIELD_CASCADES", implode(",", $objElementField->getCascades()));
}
}
if (!empty($strDescription)) {
$objFieldTpl->setVariable("FIELD_DESCRIPTION", $objField->getDescription());
}
$objFieldTpl->parseCurrentBlock();
break;
case FIELD_TYPE_LARGETEXT:
$objFieldTpl->addBlockfile('ELEMENT_FIELD', 'field.simpletext', 'elementfield_textarea.tpl.htm');
foreach ($objContentLangs as $objContentLanguage) {
$objFieldTpl->setCurrentBlock("field.simpletext.value");
$objFieldTpl->setVariable("FIELD_LANGUAGE_ID", "efv_{$objField->getId()}_{$objContentLanguage->getId()}");
if (is_object($objElement)) {
$strValue = htmlspecialchars($objElement->getValueByTemplateField($objField->getId(), $objContentLanguage->getId()));
} else {
$strValue = "";
}
$objFieldTpl->setVariable("FIELD_LANGUAGE_VALUE", $strValue);
$objFieldTpl->parseCurrentBlock();
}
//*** Calculate and set the textarea height.
$minHeight = 115;
$maxHeight = 400;
$intHeight = $minHeight;
$objValue = $objField->getValueByName("tfv_field_max_characters");
$strMaxChar = is_object($objValue) ? $objValue->getValue() : "";
if (!empty($strMaxChar) && is_numeric($strMaxChar)) {
$intHeight = ($strMaxChar - 500) * 0.05 + $minHeight;
if ($intHeight < $minHeight) {
$intHeight = $minHeight;
}
if ($intHeight > $maxHeight) {