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>'; } }
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')); } }
<?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>';
<ul> <li><?php echo Html::anchor(Url::action('IconHarvesterHomeController::index'), 'Home'); ?> </li> <!-- Add your application's navigation links here. --> </ul>
<?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>
<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
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
<ul> <li><?php echo Html::anchor(Url::action('AnnotationExamplesHomeController::index'), 'Home'); ?> </li> <!-- Add your application's navigation links here. --> </ul>
<?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');
<ul> <li><?php echo Html::anchor(Url::action('{{programmaticName}}HomeController::index'), 'Home'); ?> </li> <!-- Add your application's navigation links here. --> </ul>
<?php if (isset($flash)) { ?> <div class="error"> <?php echo $flash; ?> </div> <?php } ?> <ul> <?php foreach ($themeSet as $theme) { ?> <li><?php echo Html::anchor(Url::action('ThemeController::details', $theme->id), $theme->name); ?> by <?php echo $theme->artist; ?> </li> <?php } ?> </ul> <?php echo Html::anchor(Url::action('ThemeController::index') . '?page=' . ($page + 1), 'Load More');
?> <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); }
public static function action($action, $variables = []) { header("Location: " . Url::action($action, $variables)); }
/** * Email activation * AccountController::emailActivation() * * @return */ public function emailActivation($activationCode) { $status = $this->userService->updateEmail($activationCode); $url = Url::action('ProfileController@emailActivationResponse', $status); return Redirect::to($url); }
<?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>