本文整理汇总了PHP中TTable::setCaption方法的典型用法代码示例。如果您正苦于以下问题:PHP TTable::setCaption方法的具体用法?PHP TTable::setCaption怎么用?PHP TTable::setCaption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TTable
的用法示例。
在下文中一共展示了TTable::setCaption方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderRepeater
/**
* Renders the repeated items.
* @param THtmlWriter writer for the rendering purpose
* @param IRepeatInfoUser repeat information user
*/
public function renderRepeater($writer, IRepeatInfoUser $user)
{
if ($this->_repeatLayout === TRepeatLayout::Table) {
$control = new TTable();
if ($this->_caption !== '') {
$control->setCaption($this->_caption);
$control->setCaptionAlign($this->_captionAlign);
}
} else {
if ($this->_repeatLayout === TRepeatLayout::Raw) {
$this->renderRawContents($writer, $user);
return;
} else {
$control = new TWebControl();
}
}
$control->setID($user->getClientID());
$control->copyBaseAttributes($user);
if ($user->getHasStyle()) {
$control->getStyle()->copyFrom($user->getStyle());
}
$control->renderBeginTag($writer);
$writer->writeLine();
if ($this->_repeatDirection === TRepeatDirection::Vertical) {
$this->renderVerticalContents($writer, $user);
} else {
$this->renderHorizontalContents($writer, $user);
}
$control->renderEndTag($writer);
}