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


PHP Container::addPage方法代码示例

本文整理汇总了PHP中Container::addPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::addPage方法的具体用法?PHP Container::addPage怎么用?PHP Container::addPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Container的用法示例。


在下文中一共展示了Container::addPage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setParent

 /**
  * Sets parent container
  *
  * @param  Container $parent  [optional] new parent to set.
  *                                            Default is null which will set
  *                                            no parent.
  * @return Page               fluent interface, returns self
  */
 public function setParent(Container $parent = null)
 {
     if ($parent === $this) {
         throw new Exception('A page cannot have itself as a parent');
     }
     // return if the given parent already is parent
     if ($parent === $this->_parent) {
         return $this;
     }
     // remove from old parent
     if (null !== $this->_parent) {
         $this->_parent->removePage($this);
     }
     // set new parent
     $this->_parent = $parent;
     // add to parent if page and not already a child
     if (null !== $this->_parent && !$this->_parent->hasPage($this, false)) {
         $this->_parent->addPage($this);
     }
     return $this;
 }
开发者ID:schpill,项目名称:thin,代码行数:29,代码来源:Page.php

示例2: Radiogroup

$rg = $form->add(new Radiogroup('plan', 'plan', 'Select your plan:'), true);
$rg->addRadio('Silver', '0');
$rg->addRadio('Gold', '1');
$rg->addRadio('Diamond', '3', '', true);
$rg->fieldContain(true);
/**
 * Add and config a jqmCheckgroup object.
 */
$form->add('<h3>Checkbox Group</h3>');
$cg = $form->add(new Checkboxgroup(), true);
$cg->legend('Favorite Search Engine:');
$cg->addCheckbox('se1', 'se1', 'Bing');
$cg->addCheckbox('se2', 'se2', 'Google');
$cg->addCheckbox('se3', 'se3', 'Yahoo')->fieldContain(true);
/**
 * Add a new input object (submit button).
 */
//$form->add(new input('', '', 'submit', 'Send Now', '', 'b'));
/**
 * Add and config a button object with data-rel="dialog".
 */
$send = $form->add(new Button(), true);
$send->text('Send Now')->href('example-1.php?rand=' . rand(0, 9999))->attribute('data-rel', 'dialog');
/**
 * Add the page to iMobile object.
 */
$j->addPage($p);
/**
 * Generate the HTML code.
 */
echo $j;
开发者ID:TechnoSoluciones,项目名称:B2C,代码行数:31,代码来源:example-4.php

示例3: Listview

$p->footer()->group(true)->uiBar(true)->theme('a');
/**
 * Create and config a new listview object and add Basic Items.
 */
$p->addContent('<h1>Adding Listviews</h1>');
$p->addContent('<h3>Basic</h3>');
$list1 = new Listview();
$list1->addDivider('Basic Examples', '2')->inset(true);
$list1->addBasic('Example 1', 'example-1.php');
$list1->addBasic('Example 2', 'example-2.php');
$list1->addDivider('Advanced Examples', '3')->inset(true);
$list1->addBasic('Example 3', 'example-3.php');
$list1->addBasic('Example 4', 'example-4.php');
$list1->addBasic('Example 5', '#');
$p->addContent($list1);
echo $j->addPage($p);
exit;
/**
 * Create and config a new listview object and add Icon Items.
 */
$p->addContent('<h3>Icon</h3>');
$list2 = new Listview();
$list2->inset(true)->addDivider('Animals')->dividerTheme('a');
$list2->addIcon('Dogs', '#', 'images/dog.png', '13');
$list2->addIcon('Cats', '#', 'images/cat.png', '10');
$p->addContent($list2);
/**
 * Create and config a new listview object and add Thumbnails Items.
 */
$p->addContent('<h3>Thumbnails</h3>');
$list3 = new Listview();
开发者ID:TechnoSoluciones,项目名称:B2C,代码行数:31,代码来源:example-5.php


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