本文整理匯總了PHP中WebPage::details方法的典型用法代碼示例。如果您正苦於以下問題:PHP WebPage::details方法的具體用法?PHP WebPage::details怎麽用?PHP WebPage::details使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WebPage
的用法示例。
在下文中一共展示了WebPage::details方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DisplayPreview
function DisplayPreview(WebPage $oPage)
{
$aDetails = array();
$sClass = get_class($this);
$aList = MetaModel::GetZListItems($sClass, 'preview');
foreach ($aList as $sAttCode) {
$aDetails[] = array('label' => MetaModel::GetLabel($sClass, $sAttCode), 'value' => $this->GetAsHTML($sAttCode));
}
$oPage->details($aDetails);
}
示例2: DisplayDetails
public function DisplayDetails(WebPage $oPage, $bEditMode = false)
{
$oPage->add('<h1>' . MetaModel::GetName(get_class($this)) . ': ' . $this->GetName() . '</h1>');
$aValues = array();
$aList = MetaModel::FlattenZList(MetaModel::GetZListItems(get_class($this), 'details'));
if (empty($aList)) {
$aList = array_keys(MetaModel::ListAttributeDefs(get_class($this)));
}
foreach ($aList as $sAttCode) {
$aValues[$sAttCode] = array('label' => MetaModel::GetLabel(get_class($this), $sAttCode), 'value' => $this->GetAsHTML($sAttCode));
}
$oPage->details($aValues);
}