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


PHP url::setParam方法代码示例

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


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

示例1: renderAsIcons

 function renderAsIcons()
 {
     $out = '';
     if (isset($this->pager)) {
         $out .= $this->pager->render();
     }
     // $out.='<table border="1">';
     /*
     if (is_array($this->column))
     {
     		foreach ($this->column as $id=>$column)
     		{
     				$out.='<th>' . $column['title'] .'</th>';
     		}
     }
     else
     {
     		trigger_error('datagrid::render() no column defined');
     }
     
     if (is_array($this->local_action))
     {
     		$out.='<th>' . translate('datagrid_action_header') .'</th>';
     }
     */
     if (is_array($this->data)) {
         $i = 0;
         foreach ($this->data as $data) {
             $i++;
             if ($i >= count($this->data)) {
                 $out .= '<table class="icon_table" style="float: none">';
             } else {
                 $out .= '<table class="icon_table" style="float: left">';
             }
             $out .= '<tr>';
             $out .= '<td>';
             $out .= '<img src="decoration/types/folder.png">';
             $out .= '</td>';
             $out .= '</tr>';
             $out .= '<tr>';
             $out .= '<td>';
             $out .= substr($data['title'], 0, 32);
             $out .= '<br/>';
             // add local action buttons
             if (is_array($this->local_action)) {
                 //$out .= '<td>';
                 foreach ($this->local_action as $action) {
                     require_once ROOT . '/class/url.class.php';
                     $url = new url();
                     // find the primary columns to pass to the url
                     foreach ($this->column as $id => $column) {
                         if ($column['primary']) {
                             $url->setParam($id, $data[$id]);
                         }
                     }
                     $url->setFilename($action['url']);
                     $out .= '<a href="' . $url->render() . '">' . $action['title'] . '</a> ';
                 }
             }
             $out .= '</td>';
             $out .= '</tr>';
             $out .= '</table>';
             foreach ($this->column as $id => $column) {
                 // $out.='<td>' . substr($data[$id], 0, 32) .'</td>';
             }
         }
     } else {
         translate('empty_datagrid');
     }
     // add local action buttons
     if (is_array($this->global_action)) {
         foreach ($this->global_action as $action) {
             require_once ROOT . '/class/url.class.php';
             $url = new url();
             $url->setFilename($action['url']);
             require_once ROOT . '/class/button.class.php';
             $button = new button($action['title'], $url->render());
             $out .= $button->render();
         }
     }
     return $out;
 }
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:82,代码来源:grid.class.php

示例2: url

<?php

require_once '../class/url.class.php';
require_once '../class/record.class.php';
require_once '../thinkedit.init.php';
$url = new url();
$url->setParam('id', 7);
$url->setParam('action', 'move');
$url->setParam('locale', 'en');
$url->unSetParam('id');
echo '<pre>';
echo $url->render();
// try it with ./url.test.php?test_class=record&test_type=article&test_id=5
// and with url.test.php?test_class=record&test_type=article
echo $url->getParam('test');
$record = new record('article');
$record->set('id', 5);
$url->addObject($record, 'my_');
echo '<hr>';
echo $url->render();
$object = $url->getObject('test_');
$object->load();
echo '<hr>';
print_r($object);
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:24,代码来源:url.test.php

示例3: url

$page->startPanel('test');
$page->add($module->view());
$page->endPanel('test');
$page->startPanel('title');
$page->add('<h1>Welcome to Thinkedit 3.0</h1>');
$page->endPanel('title');
$page->addSeparator();
$page->startPanel('help');
$page->add('Navigate using icons bellow, use "up" to go up in the hierarchy');
$page->endPanel('help');
$page->addSeparator();
$page->startPanel('breadcrumb');
$parent = $module->getParent();
if ($parent) {
    $parent_link = new url();
    $parent_link->setParam('node', $parent->getNode());
    $page->add('<a href="' . $parent_link->render() . '">Up</a> ');
} else {
    $page->add('You are at the root of this site');
}
$page->endPanel('breadcrumb');
$page->addSeparator();
$browser->addAction('delete', 'effacer');
$browser->setGlobalAction('browse');
$childs = $module->getChild();
if ($childs) {
    foreach ($childs as $child) {
        $browser->addFolder($child);
    }
}
$page->startPanel('browser');
开发者ID:BackupTheBerlios,项目名称:thinkedit-svn,代码行数:31,代码来源:browser2.test.php


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