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


PHP Url::action方法代码示例

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


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

示例1: printClassesInNamespace

function printClassesInNamespace($namespace)
{
    $classes = Library::findClassesIn($namespace);
    if (!empty($classes)) {
        echo '<ul>';
        foreach ($classes as $class) {
            echo '<li>' . Html::anchor(Url::action('RecessToolsCodeController::classInfo', $namespace . $class), $class) . '</li>';
        }
        echo '</ul>';
    }
}
开发者ID:amitshukla30,项目名称:recess,代码行数:11,代码来源:app.html.php

示例2: authorize

 public function authorize()
 {
     // Prevent the user from having access to protected content
     foreach ($this->excludedRoutes as $excludedRoute) {
         if (preg_match_all("/{$excludedRoute}/i", Router::getRoute()) > 0) {
             return;
         }
     }
     if (!Session::get("logged_in")) {
         Redirect::path($this->signinRoute ? $this->signinRoute : Url::action('signin'));
     }
 }
开发者ID:ntentan,项目名称:social-extension,代码行数:12,代码来源:SigninComponent.php

示例3:

<?php

Part::input($action, 'string');
Part::input($display, 'string');
Part::input($selectedUrl, 'string');
if ($selectedUrl == $display) {
    $liClass = ' class="highlight"';
} else {
    $liClass = '';
}
echo '<li' . $liClass . '>' . Html::anchor(Url::action($action), $display) . '</li>';
开发者ID:amitshukla30,项目名称:recess,代码行数:11,代码来源:navigation-item.part.php

示例4:

<ul>
	<li><?php 
echo Html::anchor(Url::action('IconHarvesterHomeController::index'), 'Home');
?>
</li>
	<!-- 
	Add your application's navigation links here.
	-->
</ul>
开发者ID:ratz,项目名称:icon-harvester,代码行数:9,代码来源:navigation.part.php

示例5: foreach

<?php

Layout::extend('layouts/master');
$title = 'Home';
?>
<ul>
<?php 
// This is a really slow way to generate navigation.
// You probably should not use this in a real app. Thx -Kris
Library::import('recess.lang.Inflector');
$app = $controller->application();
$controllers = $app->listControllers();
foreach ($controllers as $controllerClass) {
    $title = Inflector::toEnglish(str_replace('Controller', '', $controllerClass));
    ?>
	<li><?php 
    echo Html::anchor(Url::action($controllerClass . '::index'), $title);
    ?>
</li>
<?php 
}
?>
</ul>
开发者ID:ratz,项目名称:icon-harvester,代码行数:23,代码来源:index.html.php

示例6:

<h1><?php 
echo Html::anchor(Url::action('ThemeController::details', $theme->id), $theme->name);
?>
 by <?php 
echo $theme->artist;
?>
</h1>

<?php 
if ($current_page != $total_pages) {
    echo "<p>Processed page {$current_page} of {$total_pages}.</p>";
}
?>

<?php 
echo Html::anchor(Url::action('ThemeController::index'), 'Back to list of themes');
?>

<ul class="icons">
	<?php 
foreach ($icons as $icon) {
    $app = $icon->app();
    $artist = $icon->artist();
    $icon_name = $app ? $app->name : 'Unknown';
    $artist_name = $artist ? $artist->name : 'Unknown';
    $class = $app ? '' : 'unknown-app';
    ?>
	<li><img class="<?php 
    echo $class;
    ?>
" src="<?php 
开发者ID:ratz,项目名称:icon-harvester,代码行数:31,代码来源:details.html.php

示例7: Session

require 'server/classes/Url.class.php';
require 'server/classes/Session.class.php';
// cria uma nova sessão e instancia o controle de URL
$session = new Session(true);
$url = new Url();
?>
<!DOCTYPE html>
<html>
	<head>
		<?php 
// procura o arquivo 'headHTML.php', se ele existir o inclui
$uri = requirePage('server/helpers/headHTML.php');
include_once $uri;
// procura o cabeçalho arquivo que é obtido pela URL, se ele existir & se
// já existir um usuáro logado, o inclui
$uri = 'public/pages/' . $url->controller() . '/head/' . $url->action() . '.php';
$uri = requirePage($uri, 'head/');
include_once $uri;
?>
	</head>
	<body>
		<?php 
// procura o arquivo de cabeçalho, se ele existir o inclui
$uri = requirePage('public/header.php');
include_once $uri;
// procura o corpo do arquivo que é obtido pela URL, se ele existir & se
// já existir um usuáro logado, o inclui
$uri = 'public/pages/' . $url->controller() . '/' . $url->action() . '.php';
$uri = requirePage($uri);
include_once $uri;
// procura o arquivo de rodapé, se ele existir o inclui
开发者ID:ahxsahxs,项目名称:datae,代码行数:31,代码来源:index.php

示例8:

<?php

Layout::extend('layouts/theme');
if (isset($theme->id)) {
    $title = 'Edit Theme #' . $theme->id;
} else {
    $title = 'Create New Theme';
}
$title = $title;
?>

<?php 
Part::draw('theme/form', $_form, $title);
?>

<?php 
echo Html::anchor(Url::action('ThemeController::index'), 'Theme List');
开发者ID:ratz,项目名称:icon-harvester,代码行数:17,代码来源:editForm.html.php

示例9: ksort

        ?>
		<tr>
		<td><?php 
        echo $method;
        ?>
</td>
		<td><?php 
        echo $fullPath;
        ?>
</td>
		<td><?php 
        echo Html::anchor(Url::action('RecessToolsCodeController::classInfo', $route->class), Library::getClassName($route->class));
        ?>
</td>
		<td><?php 
        echo Html::anchor(Url::action('RecessToolsCodeController::classInfo', $route->class) . '#method_' . $route->function, $route->function);
        ?>
</td>
		</tr>
	<?php 
    }
}
if (!empty($staticPaths) || !empty($parametricPaths)) {
    ksort($staticPaths);
    ksort($parametricPaths);
    foreach ($staticPaths as $path => $node) {
        Part::draw('routes/rows', $node, $fullPath . '/' . $path, $omit);
    }
    foreach ($parametricPaths as $path => $node) {
        Part::draw('routes/rows', $node, $fullPath . '/$' . $path, $omit);
    }
开发者ID:amitshukla30,项目名称:recess,代码行数:31,代码来源:rows.part.php

示例10: action

 public static function action($action, $variables = [])
 {
     header("Location: " . Url::action($action, $variables));
 }
开发者ID:ntentan,项目名称:ntentan,代码行数:4,代码来源:Redirect.php

示例11: emailActivation

 /**
  * Email activation
  * AccountController::emailActivation()
  *
  * @return
  */
 public function emailActivation($activationCode)
 {
     $status = $this->userService->updateEmail($activationCode);
     $url = Url::action('ProfileController@emailActivationResponse', $status);
     return Redirect::to($url);
 }
开发者ID:agriya,项目名称:webshopauthenticate,代码行数:12,代码来源:AccountController.php

示例12:

<?php

Part::input($theme, 'Theme');
?>
<h1><?php 
echo Html::anchor(Url::action('ThemeController::details', $theme->id), $theme->name);
?>
 by <?php 
echo $theme->artist;
?>
</h1>

<ul>
	<?php 
foreach ($icons as $icon) {
    ?>
		<li><?php 
    echo $icon->src;
    ?>
</li>
	<?php 
}
?>
</ul>
开发者ID:ratz,项目名称:icon-harvester,代码行数:24,代码来源:details.part.php


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