本文整理汇总了PHP中Button::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::render方法的具体用法?PHP Button::render怎么用?PHP Button::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button::render方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testRender
/**
* @covers Xoops\Form\Button::render
*/
public function testRender()
{
$value = $this->object->render();
$this->assertTrue(false !== strpos($value, '<input'));
$this->assertTrue(false !== strpos($value, 'type="button"'));
$this->assertTrue(false !== strpos($value, 'name="button_name"'));
$this->assertTrue(false !== strpos($value, 'id="button_name"'));
$this->assertTrue(false !== strpos($value, 'title="button_caption"'));
$this->assertTrue(false !== strpos($value, 'value="button_value"'));
}
示例2: render
/**
* Render button
*
* @return void
*/
function render()
{
if (!isset($this->options['icons']['secondary'])) {
$this->options['icons']['secondary'] = $this->js_triangle_class;
}
parent::render();
}
示例3: test__construct
/**
* @covers Xoops\Form\Button::__construct
* @covers Xoops\Form\Button::render
* @covers Xoops\Form\Element::themeDecorateElement
*/
public function test__construct()
{
$oldWay = new Button('mycaption', 'myname', 'myvalue', 'button');
$newWay = new Button(['caption' => 'mycaption', 'type' => 'button', 'name' => 'myname', 'value' => 'myvalue']);
$this->assertEquals($oldWay->render(), $newWay->render());
$this->assertNotFalse($oldWay->hasClassLike('btn'));
}
示例4: testMultiplos
public function testMultiplos($value = '')
{
$button = new Button(['value' => "Valor"]);
$button->addBtn(new Button(['value' => "Novo"]));
$this->assertEquals($button->renderButton(), '<input value="Valor" type="button" />');
$this->assertEquals($button->render(), '<div class=\'form-group\'><input value="Valor" type="button" /><input value="Novo" type="button" /></div>');
}
示例5: render
/**
* @return string
*/
public function render()
{
if ($this->isLegacyMode()) {
$this->addClass('serendipityPrettyButton');
$this->addClass('input_button');
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'\\&\\#x0300\\;','')");
} else {
$this->addClass('wrap_selection');
$this->setOpenTag('̀');
}
return parent::render();
}
示例6: render
/**
* @return string
*/
public function render()
{
if ($this->isLegacyMode()) {
$this->addClass('serendipityPrettyButton');
$this->addClass('input_button');
if ($this->isXhtml11()) {
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'<del>','</del>')");
} else {
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'<s>','</s>')");
}
} else {
$this->addClass('wrap_selection');
$this->addClass('lang-html');
$this->setOpenTag('p style=\'text-decoration: line-through;\'');
$this->setCloseTag('p');
}
return parent::render();
}
示例7: render
/**
* @return string
*/
public function render()
{
if ($this->isLegacyMode()) {
$this->addClass('serendipityPrettyButton');
$this->addClass('input_button');
if ($this->isXhtml11()) {
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'<div class=\\'s9y_typeset s9y_typeset_center\\' style=\\'text-align: center; margin: 0px auto 0px auto\\'>','</div>')");
} else {
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'<center>','</center>')");
}
} else {
$this->addClass('wrap_selection');
$this->addClass('lang-html');
$this->setOpenTag('p style=\'text-align: center;\'');
$this->setCloseTag('p');
}
return parent::render();
}
示例8: render
/**
* @return string
*/
public function render()
{
if ($this->isLegacyMode()) {
$this->addClass('serendipityPrettyButton');
$this->addClass('input_button');
if ($this->isUseRealApos() === false) {
if ($this->isUseNamedEnts()) {
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'’','')");
} else {
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'’','')");
}
} else {
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'\\&\\#39\\;','')");
}
} else {
$this->addClass('wrap_selection');
$this->setOpenTag(''');
}
return parent::render();
}
示例9: render
/**
* @return string
*/
public function render()
{
$this->overwriteValue();
if ($this->isLegacyMode()) {
$this->addClass('serendipityPrettyButton');
$this->addClass('input_button');
if ($this->isUseNamedEnts()) {
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "']," . $this->getSurroundingNamedEntitiesStringByType() . ")");
} else {
$this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "']," . $this->getSurroundingStringByType() . ")");
}
} else {
$this->addClass('wrap_selection');
$namedEntities = $this->getCleanSurroundingStringByType();
$tags = explode(',', $namedEntities);
$this->setOpenTag(trim($tags[0], '\''));
$this->setCloseTag(trim($tags[1], '\''));
}
return parent::render();
}
示例10: render
public function render()
{
$this->setAttribute("type", "submit");
return parent::render();
}
示例11: render
public function render()
{
$this->set('type', 'submit');
return parent::render();
}