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


PHP Link::getLink方法代码示例

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


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

示例1: test_it_gets_link

 public function test_it_gets_link()
 {
     $Framework = new \Devise\Support\Framework();
     $cookie = [];
     $Link = new Link($Framework);
     $output = $Link->getLink($cookie);
     assertEquals('<a href="http://localhost?dir=asc" class="page-sort"></a> ', $output);
 }
开发者ID:alpas29,项目名称:cms,代码行数:8,代码来源:LinkTest.php

示例2: testSettingRequest

 public function testSettingRequest()
 {
     $request = $this->makeRequest();
     $request->expects($this->once())->method('getScriptName')->will($this->returnValue('/htdocs/test.php'));
     $link = new Link('test');
     $link->setRequest($request);
     $this->assertEquals('/htdocs/test.php?r=test', $link->getLink());
 }
开发者ID:ansarbek,项目名称:beaver-mysql-logger,代码行数:8,代码来源:LinkTest.php

示例3: translate

                } else {
                    CmnFns::do_error_box(translate('That record could not be found.'), '', false);
                }
            } else {
                CmnFns::do_error_box(translate('That reservation is at full capacity.'), '', false);
            }
        }
    } else {
        CmnFns::do_error_box(translate('No invite was selected'), '', false);
    }
} else {
    if (isset($_POST['n'])) {
        if (Auth::is_logged_in()) {
            $msg = Link::getLink('ctrlpnl.php', translate('Return to My Control Panel'));
        } else {
            $msg = Link::getLink('index.php', translate('Login to manage all of your invitiations'));
        }
        CmnFns::do_message_box($msg);
    } else {
        $resid = $_GET['id'];
        $action = $_GET['action'];
        $res = new Reservation($resid);
        $resource = new Resource();
        $max_participants = $resource->get_property('max_participants', $res->get_machid());
        // If the total number of users (minus the owner) already participating is less than the max, let this user participate
        if ($action == INVITE_DECLINE || ($max_participants == '' || count($res->participating_users) < $max_participants)) {
            $msg = '<h5>' . translate('Confirm reservation participation') . '</h5><br/>';
            $word = $_GET['action'] == INVITE_ACCEPT ? 'Accept' : 'Decline';
            $msg .= '<input type="submit" class="button" name="y" value="' . translate($word) . '"/>';
            $msg .= ' ';
            $msg .= '<input type="submit" class="button" name="n" value="' . translate('Cancel') . '"/>';
开发者ID:razagilani,项目名称:srrs,代码行数:31,代码来源:manage_invites.php

示例4: date

		xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
    //home page
    $xmlString .= '
	<url>
		<loc>' . _TM_BASE_URL_ . '</loc>
		<lastmod>' . date('c') . '</lastmod>
		<changefreq>daily</changefreq>
		<priority>1.0</priority>
	</url>';
    $link = new Link();
    //category page
    $result = Db::getInstance()->getAll('SELECT rule_link AS link FROM `' . DB_PREFIX . 'rule` WHERE entity="Category"');
    foreach ($result as $row) {
        $xmlString .= '
	<url>
		<loc>' . $link->getLink($row['link']) . '</loc>
		<lastmod>' . date('c') . '</lastmod>
		<changefreq>daily</changefreq>
		<priority>0.6</priority>
	</url>';
    }
    //brand page
    $result = Db::getInstance()->getAll('SELECT rule_link AS link FROM `' . DB_PREFIX . 'rule` WHERE `entity`="Brand"');
    foreach ($result as $row) {
        $xmlString .= '
	<url>
		<loc>' . $link->getLink($row['link']) . '</loc>
		<lastmod>' . date('c') . '</lastmod>
		<changefreq>daily</changefreq>
		<priority>0.6</priority>
	</url>';
开发者ID:yiuked,项目名称:tmcart,代码行数:31,代码来源:sitemap.php

示例5: get_message

?>
</h1>

			</div>

			<?php 
get_message();
?>

			<?php 
if (is_single()) {
    ?>

				<?php 
    $link_id = get_var('id');
    $link = $link_id ? Link::getLink($link_id) : false;
    $link_name = $link ? $link->getName() : '';
    $link_description = $link ? $link->getDescription() : '';
    $link_url = $link ? $link->getURL() : '';
    $link_bg_color = $link ? $link->getBGColor() : '';
    $link_order = $link ? $link->getOrder() : '';
    $link_icon_class = $link ? $link->getIconClass() : '';
    ?>

				<?php 
    if (get_var('action') != 'add' && !$link) {
        ?>

					<?php 
        create_message('danger', 'Link does not exist!', true);
        ?>
开发者ID:Hackmastr,项目名称:apps-base,代码行数:31,代码来源:template-admin-link.php

示例6: createHrefLink

function createHrefLink($str_or_object_link, $target = '', $onclick = '')
{
    $html = "";
    if ($str_or_object_link != "") {
        if (gettype($str_or_object_link) != "object" && strtoupper(substr($str_or_object_link, 0, 11)) != "JAVASCRIPT:" && strtoupper(substr($str_or_object_link, 0, 1)) != "#") {
            $tmp_link = new Link($str_or_object_link, $target);
            if (!$tmp_link->getUserHaveRights()) {
                return "";
            }
            $html .= $tmp_link->getLink();
            if ($tmp_link->getTarget() != "") {
                $html .= "\" target=\"" . $tmp_link->getTarget();
            }
            if ($onclick != "") {
                $html .= "\" onClick=\"" . $onclick;
            }
        } else {
            if (gettype($str_or_object_link) != "object" && strtoupper(substr($str_or_object_link, 0, 11)) == "JAVASCRIPT:") {
                $html .= "javascript:void(0);\" onClick=\"" . str_replace("javascript:", "", str_replace("javascript:void(0);", "", $str_or_object_link)) . $onclick;
            } else {
                if (gettype($str_or_object_link) != "object" && strtoupper(substr($str_or_object_link, 0, 1)) == "#") {
                    $cur_page = Page::getInstance($_GET['p']);
                    $html .= $cur_page->getCurrentURL() . $str_or_object_link;
                    if ($onclick != "") {
                        $html .= "\" onClick=\"" . $onclick;
                    }
                } else {
                    if (get_class($str_or_object_link) == "Link") {
                        if (!$str_or_object_link->getUserHaveRights()) {
                            return "";
                        }
                        $html .= $str_or_object_link->getLink();
                        if ($str_or_object_link->getTarget() != "") {
                            $html .= "\" target=\"" . $str_or_object_link->getTarget() . "";
                        }
                    } else {
                        if (get_class($str_or_object_link) == "DialogBox" || is_subclass_of($str_or_object_link, "DialogBox") || get_class($str_or_object_link) == "JavaScript" || is_subclass_of($str_or_object_link, "JavaScript")) {
                            $str_or_object_link->displayFormURL();
                        }
                        $tmp_link = $str_or_object_link->render();
                        if (strtoupper(substr($tmp_link, 0, 11)) == "JAVASCRIPT:") {
                            $html .= "javascript:void(0);\" onClick=\"" . str_replace("javascript:", "", str_replace("javascript:void(0);", "", $tmp_link)) . $onclick;
                        } else {
                            $html .= $tmp_link;
                        }
                    }
                }
            }
        }
    } else {
        $html .= "javascript:void(0);";
    }
    return $html;
}
开发者ID:kxopa,项目名称:WebSite-PHP,代码行数:54,代码来源:utils.inc.php


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