本文整理汇总了PHP中Nette\Utils\Html::add方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::add方法的具体用法?PHP Html::add怎么用?PHP Html::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nette\Utils\Html
的用法示例。
在下文中一共展示了Html::add方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name, $label)
{
$this->monitor('Drahak\\Tables\\Table');
parent::__construct(NULL, $name);
$this->cellPrototype = Html::el('td');
$this->labelPrototype = Html::el('th');
$this->labelPrototype->add(Html::el('a', $label));
$this->column = $name;
}
示例2: tryAddIcon
/**
* Should the element has an icon?
* @param Html $el
* @param string|null $icon
* @param string $name
* @return void
*/
public function tryAddIcon($el, $icon, $name)
{
if ($icon) {
$el->add(Html::el('span')->class(DataGrid::$icon_prefix . $icon));
if (strlen($name)) {
$el->add(' ');
}
}
}
示例3: render
public function render()
{
if (empty($this->dotaz)) {
throw new \Flame\Ares\AresException('Vyplň alespoň jeden IČ.');
}
foreach ($this->dotaz as $key => $val) {
$this->xml->add('<Dotaz><Pomocne_ID>' . $key . '</Pomocne_ID><ICO>' . $val . '</ICO></Dotaz>');
}
$this->xml->__set('dotaz_pocet', $this->count);
return $this->xml->render();
}
示例4: input
public static function input(Html $input, BaseControl $control)
{
$name = $input->getName();
if ($name === 'select' || $name === 'textarea' || $name === 'input' && !in_array($input->type, array('radio', 'checkbox', 'file', 'hidden', 'range', 'image', 'submit', 'reset'))) {
$input->addClass('form-control');
} elseif ($name === 'input' && ($input->type === 'submit' || $input->type === 'reset')) {
$input->setName('button');
$input->add($input->value);
$input->addClass('btn');
}
return $input;
}
示例5: buildFooter
private function buildFooter(Html $output)
{
$footer = new Footer($this->paginator);
$footerObject = $footer->render();
$output->add($footerObject);
}
示例6: _addOperationToMenu
/**
* @param string $operationName
* @param Html $menu
* @param string $mediaTrigger
*/
private function _addOperationToMenu($operationName, &$menu, $mediaTrigger)
{
switch ($operationName) {
case 'newFolder':
$menu->add($this->createNewFolderMenuItem());
break;
case 'newGallery':
$menu->add($this->createNewGalleryMenuItem());
break;
case 'loadFiles':
$menu->add($this->createLoadFilesMenuItem());
break;
case 'loadImages':
$menu->add($this->createLoadImagesMenuItem());
break;
case 'insertGallery':
$menu->add($this->createInsertGalleryMenuItem($mediaTrigger));
break;
case 'insertFile':
$menu->add($this->createInsertFileMenuItem($mediaTrigger));
break;
}
}
示例7: buildPaginatorPages
private function buildPaginatorPages(Html $unorderedList)
{
$actualPage = $this->paginator->page;
for ($i = 1; $i <= $this->paginator->pageCount; $i++) {
if ($this->shouldSkipThisPaginationPage($i)) {
continue;
}
$httpService = new HttpService();
$paginationUrl = $httpService->getUrlWithPaginator($i);
$listItem = $this->html->el('li');
$anchor = $this->html->el('a')->addAttributes(array('href' => $paginationUrl))->setText($i);
if ($actualPage == $i) {
$listItem->addAttributes(array('class' => 'active'));
}
$listItem->add($anchor);
$unorderedList->add($listItem);
}
}