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


PHP Link::build方法代码示例

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


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

示例1: logoutAction

 protected function logoutAction()
 {
     try {
         $userLogin = new Bobr_User_UserLogin();
         $userLogin->logOut();
         Lib_Messanger::addNote('Uzivatel byl odhlasen.');
         Bobr_Request_HttpRequest::redirect(Link::build('login/login'));
     } catch (UserLoginException $e) {
         echo $e->getMessage();
     }
     return '';
 }
开发者ID:laiello,项目名称:webuntucms,代码行数:12,代码来源:Exec.php

示例2: Input

    if($length < 10) {
    	$size = 10;
    }
    */
    $inp = new Input();
    $inp->setName($colname);
    $inp->setValue($item);
    $inp->setSize(50);
    $inp->setMaxlength(128);
    /**/
    $tr = new Tr();
    $tr->add($colname);
    $tr->add($inp->dump());
    $tr->build();
    ++$i;
    /**/
}
$tr = new Tr();
$tr->add('&nbsp;');
$tr->add($submit->dump());
$tr->build();
unset($table);
unset($form);
$body->line('<hr />');
$backlink = new Link();
$backlink->setHref('controller.php?cmd=table_browse&table=' . $req->get('table'));
$backlink->setName('Back to list');
$backlink->build();
include_once './inc/footer.php';
unset($body);
unset($html);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:edit_record.php

示例3: Link

if ($req->is('view')) {
    $q = "SELECT sql FROM sqlite_master WHERE type = 'view' AND name = '" . $req->get('table') . "' ";
} else {
    $q = "SELECT sql FROM sqlite_master WHERE type = 'table' AND name = '" . $req->get('table') . "' ";
}
$sql->qo($q);
$res = $sql->fo_one();
$body->line($res->sql);
$body->line('<hr>');
if (!$req->is('view')) {
    // $body->line('create indexes - overview indexes');
    $body->line('<h3>Indexes</h3>');
    $idxadd = new Link();
    $idxadd->setHref('controller.php?cmd=index_add&table=' . $req->get('table'));
    $idxadd->setName('Add index');
    $idxadd->build();
    $body->line();
    $q = "PRAGMA index_list(" . $req->get('table') . ")";
    $sql->qo($q);
    $res = $sql->fo();
    if (!$res) {
        $body->line('No indexes defined<br>');
    } else {
        $table = new Table();
        $table->setClas('result');
        $table->build();
        $th = new Th();
        $th->add('Name');
        $th->add('Unique ?');
        $th->add('Columns');
        $th->add('&nbsp;');
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:tableinfo.php

示例4: Head

$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - show tables');
$head->setCss('./css/psa.css');
$head->setjs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$body->line();
$link = new Link();
$link->setHref('controller.php?cmd=table_add');
$link->setClas('butter');
$link->setName('Add table');
$link->build();
$body->line('<hr>');
if (!$res) {
    $body->line('No tables defined.');
} else {
    $body->line('<h3>List tables</h3>');
    $table = new Table();
    $table->setClas('result');
    $table->build();
    foreach ($res as $item) {
        if ($item->name == 'sqlite_sequence') {
            continue;
        }
        $struct = new Link();
        $struct->setHref('controller.php?cmd=tableinfo&table=' . $item->name);
        $struct->setName('Structure');
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:table.php

示例5: pagination

 /**
  * Generates the pagination
  * 
  * @TODO: Clean this up, this is batshit insane.
  *
  * @return string
  */
 function pagination($class = '')
 {
     if (!$this->allowpaging) {
         return;
     }
     $this->set_boundaries();
     // Build links before passing to template to handle AJAX if necessary
     $firstpagelink = new Link($this->page_link(0), 1, $this->ajax, $this->id, $this->response_target);
     $prevpagelink = new Link($this->page_link($this->pageno - 2), "<div class='pagin-left'></div>", $this->ajax, $this->id, $this->response_target);
     $fourprevpagelink = new Link($this->page_link($this->pageno - 5), $this->pageno - 4, $this->ajax, $this->id, $this->response_target);
     $threeprevpagelink = new Link($this->page_link($this->pageno - 4), $this->pageno - 3, $this->ajax, $this->id, $this->response_target);
     $twoprevpagelink = new Link($this->page_link($this->pageno - 3), $this->pageno - 2, $this->ajax, $this->id, $this->response_target);
     $oneprevpagelink = new Link($this->page_link($this->pageno - 2), $this->pageno - 1, $this->ajax, $this->id, $this->response_target);
     $onenextpagelink = new Link($this->page_link($this->pageno), $this->pageno + 1, $this->ajax, $this->id, $this->response_target);
     $twonextpagelink = new Link($this->page_link($this->pageno + 1), $this->pageno + 2, $this->ajax, $this->id, $this->response_target);
     $threenextpagelink = new Link($this->page_link($this->pageno + 2), $this->pageno + 3, $this->ajax, $this->id, $this->response_target);
     $fournextpagelink = new Link($this->page_link($this->pageno + 3), $this->pageno + 4, $this->ajax, $this->id, $this->response_target);
     $nextpagelink = new Link($this->page_link($this->pageno), "<div class='pagin-right'></div>", $this->ajax, $this->id, $this->response_target);
     $lastpagelink = new Link($this->page_link($this->lastpage - 1), $this->lastpage, $this->ajax, $this->id, $this->response_target);
     $template = new Template($this->pagination_template);
     $rendered = $template->render(array('count' => $this->count, 'lowerBound' => $this->lowerBound, 'upperBound' => $this->upperBound, 'pageno' => $this->pageno, 'firstpage' => $this->firstpage, 'lastpage' => $this->lastpage, 'firstpagelink' => $firstpagelink->build(), 'prevpagelink' => $prevpagelink->build(), 'fourprevpagelink' => $fourprevpagelink->build(), 'threeprevpagelink' => $threeprevpagelink->build(), 'twoprevpagelink' => $twoprevpagelink->build(), 'oneprevpagelink' => $oneprevpagelink->build(), 'onenextpagelink' => $onenextpagelink->build(), 'twonextpagelink' => $twonextpagelink->build(), 'threenextpagelink' => $threenextpagelink->build(), 'fournextpagelink' => $fournextpagelink->build(), 'nextpagelink' => $nextpagelink->build(), 'lastpagelink' => $lastpagelink->build(), 'class' => $class));
     return $rendered;
 }
开发者ID:jawngee,项目名称:HeavyMetal,代码行数:30,代码来源:databound_control.php

示例6: Link

 $next = new Link();
 if ($is_view) {
     $next->setHref('controller.php?cmd=table_browse&amp;table=' . $req->get('table') . '&amp;direction=next&view=true');
 } else {
     $next->setHref('controller.php?cmd=table_browse&amp;table=' . $req->get('table') . '&amp;direction=next');
 }
 $next->setName('[&gt;]');
 $next->build();
 $lastlink = new Link();
 if ($is_view) {
     $lastlink->setHref('controller.php?cmd=table_browse&amp;table=' . $req->get('table') . '&amp;direction=last&view=true');
 } else {
     $lastlink->setHref('controller.php?cmd=table_browse&amp;table=' . $req->get('table') . '&amp;direction=last');
 }
 $lastlink->setName('[--&gt;&gt;]');
 $lastlink->build();
 $low = $sessie->getS('bottom') + 1;
 $high = $sessie->getS('bottom') + LIMIT;
 if ($high > $records) {
     $high = $records;
 }
 $body->line(' (total # of records : <b> ' . $records . '</b> -- showing <b>' . $low . '</b> till <b>' . $high . '</b>)<br />');
 $titles = FALSE;
 $table = new Table();
 $table->setClas('result');
 $table->setId('listing');
 $table->build();
 foreach ($res as $item) {
     /**/
     if (!$titles) {
         $tr = new Th();
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:table_browse.php


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