當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。