本文整理汇总了PHP中TWebControl::addAttributesToRender方法的典型用法代码示例。如果您正苦于以下问题:PHP TWebControl::addAttributesToRender方法的具体用法?PHP TWebControl::addAttributesToRender怎么用?PHP TWebControl::addAttributesToRender使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TWebControl
的用法示例。
在下文中一共展示了TWebControl::addAttributesToRender方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addAttributesToRender
/**
* Adds attributes to renderer.
* @param THtmlWriter the renderer
* @throws TInvalidDataValueException if default button is not right.
*/
protected function addAttributesToRender($writer)
{
parent::addAttributesToRender($writer);
if (($butt = $this->getDefaultButton()) !== '') {
$writer->addAttribute('id', $this->getClientID());
}
}
示例2: addAttributesToRender
/**
* Adds attributes to renderer.
* @param THtmlWriter the renderer
* @throws TInvalidDataValueException if associated control cannot be found using the ID
*/
protected function addAttributesToRender($writer)
{
if ($this->_forControl !== '') {
$writer->addAttribute('for', $this->_forControl);
}
parent::addAttributesToRender($writer);
}
示例3: 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);
}
示例4: addAttributesToRender
/**
* Adds attributes to renderer.
* @param THtmlWriter the renderer
* @throws TInvalidDataValueException if default button is not right.
*/
protected function addAttributesToRender($writer)
{
parent::addAttributesToRender($writer);
if (($butt = $this->getDefaultButton()) !== '') {
if (($button = $this->findControl($butt)) === null) {
throw new TInvalidDataValueException('panel_defaultbutton_invalid', $butt);
} else {
$writer->addAttribute('id', $this->getClientID());
$this->getPage()->getClientScript()->registerDefaultButton($this, $button);
}
}
}
示例5: addAttributesToRender
/**
* Sets name attribute to the unique ID of the control.
* This method overrides the parent implementation with additional file update control specific attributes.
* @param THtmlWriter the writer used for the rendering purpose
*/
protected function addAttributesToRender($writer)
{
$this->getPage()->ensureRenderInForm($this);
parent::addAttributesToRender($writer);
$writer->addAttribute('type', 'file');
$writer->addAttribute('name', $this->getUniqueID());
$isEnabled = $this->getEnabled(true);
if (!$isEnabled && $this->getEnabled()) {
// in this case parent will not render 'disabled'
$writer->addAttribute('disabled', 'disabled');
}
}
示例6: addAttributesToRender
/**
* Adds attributes related to a hyperlink element to renderer.
* @param THtmlWriter the writer used for the rendering purpose
*/
protected function addAttributesToRender($writer)
{
$isEnabled = $this->getEnabled(true);
if ($this->getEnabled() && !$isEnabled) {
$writer->addAttribute('disabled', 'disabled');
}
parent::addAttributesToRender($writer);
if (($url = $this->getNavigateUrl()) !== '' && $isEnabled) {
$writer->addAttribute('href', $url);
}
if (($target = $this->getTarget()) !== '') {
$writer->addAttribute('target', $target);
}
}
示例7: 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);
}
示例8: addAttributesToRender
/**
* Adds attributes to renderer.
* @param THtmlWriter the renderer
*/
protected function addAttributesToRender($writer)
{
parent::addAttributesToRender($writer);
if (($colspan = $this->getColumnSpan()) > 0) {
$writer->addAttribute('colspan', "{$colspan}");
}
if (($rowspan = $this->getRowSpan()) > 0) {
$writer->addAttribute('rowspan', "{$rowspan}");
}
}
示例9: 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);
$writer->addAttribute('id', $this->getClientID());
// We call parent implementation here because some attributes
// may be overwritten in the following
parent::addAttributesToRender($writer);
if ($this->getEnabled(true) && $this->getEnableClientScript()) {
$this->renderLinkButtonHref($writer);
$this->renderClientControlScript($writer);
} else {
if ($this->getEnabled()) {
// in this case, parent will not render 'disabled'
$writer->addAttribute('disabled', 'disabled');
}
}
}
示例10: addAttributesToRender
/**
* Adds attributes to renderer.
* @param THtmlWriter the renderer
*/
protected function addAttributesToRender($writer)
{
$writer->addAttribute('class', $this->Parent->getPageCssClass());
$writer->addAttribute('id', $this->ClientID);
$style = ($w = $this->getWidth()) !== '' ? 'width:' . $w . ';' : '';
$style .= ($h = $this->getHeight()) !== '' ? 'height:' . $h . ';' : '';
$style .= !$this->Parent->isDefault($this->ClientID) ? 'display:none;' : '';
if ($style !== '') {
$writer->addAttribute('style', $style);
}
parent::addAttributesToRender($writer);
}
示例11: addAttributesToRender
protected function addAttributesToRender($writer)
{
$display = $this->getDisplay();
$visible = $this->getEnabled(true) && count($this->getErrorMessages()) > 0;
if (!$visible) {
if ($display === TValidationSummaryDisplayStyle::None || $display === TValidationSummaryDisplayStyle::Dynamic) {
$writer->addStyleAttribute('display', 'none');
} else {
$writer->addStyleAttribute('visibility', 'hidden');
}
}
$writer->addAttribute('id', $this->getClientID());
parent::addAttributesToRender($writer);
}
示例12: 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);
}
示例13: addAttributesToRender
/**
* Attach JavaScript helpers if this control has other controls.
*
* @see addAttributesToRender()
*/
protected function addAttributesToRender($writer)
{
if ($this->Controls->Count > 1 && $this->_expand) {
$writer->addAttribute('class', 'colapse');
}
parent::addAttributesToRender($writer);
}
示例14: addAttributesToRender
/**
* Adds attribute name-value pairs to renderer.
* This method overrides the parent implementation with additional TKeyboard specific attributes.
* @param THtmlWriter the writer used for the rendering purpose
*/
protected function addAttributesToRender($writer)
{
parent::addAttributesToRender($writer);
if ($this->getPage()->getClientSupportsJavaScript()) {
$writer->addAttribute('id', $this->getClientID());
}
}
示例15: addAttributesToRender
/**
* Adds attributes to renderer.
* @param THtmlWriter the renderer
* @throws TInvalidDataValueException if default button is not right.
*/
protected function addAttributesToRender($writer)
{
$this->setCssClass('weekScheduler_container');
parent::addAttributesToRender($writer);
}