本文整理匯總了PHP中TWebControl::setID方法的典型用法代碼示例。如果您正苦於以下問題:PHP TWebControl::setID方法的具體用法?PHP TWebControl::setID怎麽用?PHP TWebControl::setID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TWebControl
的用法示例。
在下文中一共展示了TWebControl::setID方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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);
}
示例2: render
/**
* Renders the datagrid.
* @param THtmlWriter writer for the rendering purpose
*/
public function render($writer)
{
if ($this->getHasControls()) {
$this->groupCells();
if ($this->_useEmptyTemplate) {
$control = new TWebControl();
$control->setID($this->getClientID());
$control->copyBaseAttributes($this);
if ($this->getHasStyle()) {
$control->getStyle()->copyFrom($this->getStyle());
}
$control->renderBeginTag($writer);
$this->renderContents($writer);
$control->renderEndTag($writer);
} else {
if ($this->getViewState('ItemCount', 0) > 0) {
$this->applyItemStyles();
if ($this->_topPager) {
$this->_topPager->renderControl($writer);
$writer->writeLine();
}
$this->renderTable($writer);
if ($this->_bottomPager) {
$writer->writeLine();
$this->_bottomPager->renderControl($writer);
}
}
}
}
}