当前位置: 首页>>代码示例>>PHP>>正文


PHP Button::render方法代码示例

本文整理汇总了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"'));
 }
开发者ID:redmexico,项目名称:XoopsCore,代码行数:13,代码来源:ButtonTest.php

示例2: render

 /**
  * Render button
  *
  * @return void
  */
 function render()
 {
     if (!isset($this->options['icons']['secondary'])) {
         $this->options['icons']['secondary'] = $this->js_triangle_class;
     }
     parent::render();
 }
开发者ID:easyconn,项目名称:atk4,代码行数:12,代码来源:DropButton.php

示例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'));
 }
开发者ID:ming-hai,项目名称:XoopsCore,代码行数:12,代码来源:ButtonTest.php

示例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>');
 }
开发者ID:LeandroSenni,项目名称:Code.Education.DesignPatterns,代码行数:7,代码来源:ButtonTest.php

示例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('&#x0300;');
     }
     return parent::render();
 }
开发者ID:sqall01,项目名称:additional_plugins,代码行数:15,代码来源:GaccentButton.php

示例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();
 }
开发者ID:sqall01,项目名称:additional_plugins,代码行数:21,代码来源:StrikeButton.php

示例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();
 }
开发者ID:sqall01,项目名称:additional_plugins,代码行数:21,代码来源:CenterButton.php

示例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() . "'],'&rsquo;','')");
             } else {
                 $this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'&#8217;','')");
             }
         } else {
             $this->setOnClickEvent("wrapSelection(document.forms['serendipityEntry']['" . $this->getTextarea() . "'],'\\&\\#39\\;','')");
         }
     } else {
         $this->addClass('wrap_selection');
         $this->setOpenTag('&apos;');
     }
     return parent::render();
 }
开发者ID:sqall01,项目名称:additional_plugins,代码行数:23,代码来源:AposButton.php

示例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();
 }
开发者ID:sqall01,项目名称:additional_plugins,代码行数:23,代码来源:SquotesButton.php

示例10: render

 public function render()
 {
     $this->setAttribute("type", "submit");
     return parent::render();
 }
开发者ID:ekowabaka,项目名称:cfx,代码行数:5,代码来源:SubmitButton.php

示例11: render

 public function render()
 {
     $this->set('type', 'submit');
     return parent::render();
 }
开发者ID:siriusphp,项目名称:form-renderer,代码行数:5,代码来源:Submit.php


注:本文中的Button::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。