本文整理汇总了PHP中TWebControl类的典型用法代码示例。如果您正苦于以下问题:PHP TWebControl类的具体用法?PHP TWebControl怎么用?PHP TWebControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TWebControl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: copyBaseAttributes
/**
* Copies basic control attributes from another control.
* Properties including AccessKey, ToolTip, TabIndex, Enabled
* and Attributes are copied.
* @param TWebControl source control
*/
public function copyBaseAttributes(TWebControl $control)
{
$this->setAccessKey($control->getAccessKey());
$this->setToolTip($control->getToolTip());
$this->setTabIndex($control->getTabIndex());
if (!$control->getEnabled()) {
$this->setEnabled(false);
}
if ($control->getHasAttributes()) {
$this->getAttributes()->copyFrom($control->getAttributes());
}
}
开发者ID:quantrocket,项目名称:planlogiq,代码行数:18,代码来源:TWebControl.php
示例2: 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);
}
开发者ID:bailey-ann,项目名称:stringtools,代码行数:35,代码来源:TRepeatInfo.php
示例3: addAttributesToRender
/**
* Ensure that the ID attribute is rendered and registers the javascript code
* for initializing the active control.
*/
protected function addAttributesToRender($writer)
{
//calls the TWebControl to avoid rendering other attribute normally render for a textbox.
TWebControl::addAttributesToRender($writer);
$writer->addAttribute('id', $this->getLabelClientID());
$this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
}
开发者ID:Nurudeen,项目名称:prado,代码行数:11,代码来源:TInPlaceTextBox.php
示例4: 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);
}
}
}
}
}
开发者ID:bailey-ann,项目名称:stringtools,代码行数:34,代码来源:TDataGrid.php
示例5: getAttributesToRender
/**
* This overrides the parent implementation by rendering more TWebControl-specific attributes.
* @return ArrayObject the attributes to be rendered
*/
protected function getAttributesToRender()
{
$attributes = parent::getAttributesToRender();
if ($this->getGenerateCss()) {
unset($attributes['style']);
}
if (!$this->isEnabled()) {
$attributes['disabled'] = "disabled";
}
$tabIndex = $this->getTabIndex();
if (!empty($tabIndex)) {
$attributes['tabindex'] = $tabIndex;
}
$toolTip = $this->getToolTip();
if (strlen($toolTip)) {
$attributes['title'] = $toolTip;
}
$accessKey = $this->getAccessKey();
if (strlen($accessKey)) {
$attributes['accesskey'] = $accessKey;
}
$cssClass = $this->getCssClass();
if (strlen($cssClass)) {
$attributes['class'] = $cssClass;
}
return $attributes;
}
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:31,代码来源:TCssDropDownMenu.php
示例6: renderContents
/**
* Renders the body content of the label.
* @param THtmlWriter the renderer
*/
public function renderContents($writer)
{
if (($text = $this->getText()) === '') {
parent::renderContents($writer);
} else {
$writer->write($text);
}
}
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:12,代码来源:TLabel.php
示例7: renderContents
/**
* Renders body content.
* This method overrides the parent implementation by replacing
* the body content with the processed text content.
* @param THtmlWriter writer
*/
public function renderContents($writer)
{
if (($text = $this->getText()) === '' && $this->getHasControls()) {
$textWriter = new TTextWriter();
parent::renderContents(new THtmlWriter($textWriter));
$text = $textWriter->flush();
}
if ($text !== '') {
$writer->write($this->processText($text));
}
}
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:17,代码来源:TTextProcessor.php
示例8: renderContents
/**
* Renders body content.
* This method overrides the parent implementation by replacing
* the body content with the processed text content.
* @param THtmlWriter writer
*/
public function renderContents($writer)
{
if (($text = $this->getText()) === '' && $this->getHasControls()) {
$htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
parent::renderContents($htmlWriter);
$text = $htmlWriter->flush();
}
if ($text !== '') {
$writer->write($this->processText($text));
}
}
开发者ID:Nurudeen,项目名称:prado,代码行数:17,代码来源:TTextProcessor.php
示例9: addAttributesToRender
/**
* Adds attributes related to an HTML image element to renderer.
* @param THtmlWriter the writer used for the rendering purpose
*/
protected function addAttributesToRender($writer)
{
$writer->addAttribute('src', $this->getImageUrl());
$writer->addAttribute('alt', $this->getAlternateText());
if (($desc = $this->getDescriptionUrl()) !== '') {
$writer->addAttribute('longdesc', $desc);
}
if (($align = $this->getImageAlign()) !== '') {
$writer->addAttribute('align', $align);
}
parent::addAttributesToRender($writer);
}
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:16,代码来源:TImage.php
示例10: renderContents
/**
* Renders the body content of the hyperlink.
* @param THtmlWriter the writer for rendering
*/
public function renderContents($writer)
{
if (($imageUrl = $this->getImageUrl()) === '') {
if (($text = $this->getText()) !== '') {
$writer->write(THttpUtility::htmlEncode($text));
} else {
if ($this->getHasControls()) {
parent::renderContents($writer);
} else {
$writer->write(THttpUtility::htmlEncode($this->getNavigateUrl()));
}
}
} else {
$this->createImage($imageUrl)->renderControl($writer);
}
}
开发者ID:Nurudeen,项目名称:prado,代码行数:20,代码来源:THyperLink.php
示例11: addAttributesToRender
/**
* Adds attribute name-value pairs to renderer.
* This overrides the parent implementation with additional button specific attributes.
* @param THtmlWriter the writer used for the rendering purpose
*/
protected function addAttributesToRender($writer)
{
$page = $this->getPage();
$page->ensureRenderInForm($this);
if (($uniqueID = $this->getUniqueID()) !== '') {
$writer->addAttribute('name', $uniqueID);
}
if ($this->getEnabled(true)) {
if ($this->getEnableClientScript() && $this->needPostBackScript()) {
$this->renderClientControlScript($writer);
}
} else {
if ($this->getEnabled()) {
// in this case, parent will not render 'disabled'
$writer->addAttribute('disabled', 'disabled');
}
}
parent::addAttributesToRender($writer);
}
开发者ID:silotester,项目名称:silo,代码行数:24,代码来源:TCustomButton.php
示例12: render
/**
* Renders the control.
* The method overrides the parent implementation by rendering
* the pager only when there are two or more pages.
* @param THtmlWriter the writer
*/
public function render($writer)
{
if ($this->_pageCount > 1) {
parent::render($writer);
}
}
开发者ID:quantrocket,项目名称:planlogiq,代码行数:12,代码来源:TPager.php
示例13: renderContents
public function renderContents($writer)
{
parent::renderContents($writer);
}
开发者ID:quantrocket,项目名称:planlogiq,代码行数:4,代码来源:PFGoogleChart.php
示例14: onInit
/**
* Creates the child controls of the wizard.
* This method overrides the parent implementation.
* @param TEventParameter event parameter
*/
public function onInit($param)
{
parent::onInit($param);
$this->ensureChildControls();
$this->setEnsureId(true);
if ($this->getActiveStepIndex() < 0 && $this->getWizardSteps()->getCount() > 0) {
$this->setActiveStepIndex(0);
}
}
开发者ID:tejdeeps,项目名称:tejcs.com,代码行数:14,代码来源:TWizard.php
示例15: renderBody
/**
* Renders the body content of this table.
* @return string the rendering result
*/
protected function renderBody()
{
return "\n" . parent::renderBody() . "\n";
}
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:8,代码来源:TTable.php
示例16: renderBeginTag
/**
* Renders the openning tag for the table control which will render table caption if present.
* @param THtmlWriter the writer used for the rendering purpose
*/
public function renderBeginTag($writer)
{
parent::renderBeginTag($writer);
if (($caption = $this->getCaption()) !== '') {
if (($align = $this->getCaptionAlign()) !== TTableCaptionAlign::NotSet) {
$writer->addAttribute('align', strtolower($align));
}
$writer->renderBeginTag('caption');
$writer->write($caption);
$writer->renderEndTag();
}
}
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:16,代码来源:TTable.php
示例17: onPreRender
/**
* Registers the checkbox to receive postback data during postback.
* This is necessary because a checkbox if unchecked, when postback,
* does not have direct mapping between post data and the checkbox name.
*
* This method overrides the parent implementation and is invoked before render.
* @param mixed event parameter
*/
public function onPreRender($param)
{
parent::onPreRender($param);
if ($this->getEnabled(true)) {
$this->getPage()->registerRequiresPostData($this);
}
}
开发者ID:bailey-ann,项目名称:stringtools,代码行数:15,代码来源:TCheckBox.php
示例18: getAttributesToRender
/**
* Returns the attributes to be rendered.
* @return ArrayObject attributes to be rendered
*/
protected function getAttributesToRender()
{
$attributes = parent::getAttributesToRender();
unset($attributes['id']);
return $attributes;
}
开发者ID:BackupTheBerlios,项目名称:php5cms-svn,代码行数:10,代码来源:TDataListItem.php
示例19: onPreRender
/**
* Sets Enctype of the form on the page.
* This method overrides the parent implementation and is invoked before render.
* @param mixed event parameter
*/
public function onPreRender($param)
{
parent::onPreRender($param);
if (($form = $this->getPage()->getForm()) !== null) {
$form->setEnctype('multipart/form-data');
}
$this->getPage()->getClientScript()->registerHiddenField('MAX_FILE_SIZE', $this->getMaxFileSize());
if ($this->getEnabled(true)) {
$this->getPage()->registerRequiresPostData($this);
}
}
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:16,代码来源:TFileUpload.php
示例20: addAttributesToRender
/**
* Adds attribute name-value pairs to renderer.
* This overrides the parent implementation with additional button specific attributes.
* @param THtmlWriter the writer used for the rendering purpose
*/
protected function addAttributesToRender($writer)
{
$writer->addAttribute('type', 'text/javascript');
$writer->addAttribute('src', $this->getClientScriptUrl());
parent::addAttributesToRender($writer);
}
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:11,代码来源:TClientScriptLoader.php
注:本文中的TWebControl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论