本文整理汇总了PHP中Tab::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Tab::render方法的具体用法?PHP Tab::render怎么用?PHP Tab::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tab
的用法示例。
在下文中一共展示了Tab::render方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testRender
/**
* @covers Xoops\Form\Tab::render
*/
public function testRender()
{
$button = new Button('Caption', 'name');
$this->object->addElement($button);
$value = $this->object->render();
$this->assertTrue(is_string($value));
$this->assertTrue(false !== strpos($value, '<td'));
$this->assertTrue(false !== strpos($value, 'class="head"'));
$this->assertTrue(false !== strpos($value, 'class="even"'));
$this->assertTrue(false !== strpos($value, '<input'));
$this->assertTrue(false !== strpos($value, 'type="button"'));
$this->assertTrue(false !== strpos($value, 'title="Caption"'));
$this->assertTrue(false !== strpos($value, 'id="name"'));
}
示例2: dirname
<?php
require_once dirname(__FILE__) . '/../zframework/app/library/ui/JsUIComponentInterface.php';
require_once dirname(__FILE__) . '/../zframework/app/library/ui/jquery/JUIComponent.php';
require_once dirname(__FILE__) . '/../zframework/app/library/ui/html/UIComponent.php';
require_once dirname(__FILE__) . '/../zframework/app/library/ui/jquery/Tab.php';
require_once dirname(__FILE__) . '/../zframework/app/library/ui/html/components/TextElement.php';
require_once dirname(__FILE__) . '/../zframework/app/library/ui/html/components/HtmlScript.php';
//put your code here
$sf = new Tab('test');
$sf->addTab("x1", "x1");
$sf->addTab("d1", "d1");
$e = new TextElement("xy");
$e->setAttribute("name", "dddddddd");
$e->setLabel('ddd', 'sdfdsfdsfs', 'css');
//$sf->setAttribute("id", "test");
//$sf->setAttribute("target", "_blank");
$sf->setElement("x1", $e);
$e1 = new HtmlScript();
$e1->setScript("<a herf='aa.html' target='_blank'>");
$sf->setElement('d1', $e1);
$e2 = new TextElement("xy1");
$e2->setAttribute("name", "dddddddd11");
$e2->setLabel('ddd', 'sdfdsfdsfs1', 'css1');
$sf->setElement("d1", $e2);
$e3 = new HtmlScript();
$e3->setScript("</a>");
$sf->setElement("d1", $e3);
echo $sf->render();