本文整理汇总了PHP中Layout::extend方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::extend方法的具体用法?PHP Layout::extend怎么用?PHP Layout::extend使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layout
的用法示例。
在下文中一共展示了Layout::extend方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: release
<?php
Layout::extend('master');
$title = 'Welcome to Recess!';
?>
<div class="span-24 last">
<div class="span-12 notice">
<p>Hello Friends,</p>
<p>If you're seeing this message that means you've successfully installed Recess. <strong>Now for the fun part: building apps</strong>!</p>
<p>I appreciate your interest in the <strong><a href="http://www.recessframework.org/">Recess Framework</a></strong>! I hope you'll find this preview release (mostly) functional and (a lot) fun. As you are checking out the framework and building apps stay plugged in at <a href="http://www.recessframework.org/">RecessFramework.org</a>.</p>
<p>Recess ships with an application called '<strong><a href="<?php
echo $_ENV['url.base'];
?>
recess/">Recess Tools</a></strong>'. This app is designed to help you kick off your new application and maintain a 'global' sense of your projects. <a href="recess/">Check it out.</a></p>
<p>This is the first <strong>Public Preview Release</strong> so expect some rough edges and <a href="http://recess.lighthouseapp.com/projects/19507-recess-framework/overview">report the bugs that bite</a>.</p>
<p><strong>Thanks! Let me know how it goes for you,</strong></p>
<p><strong><a href="http://www.krisjordan.com/">Kris Jordan</a></strong>
<br />(<a href="http://www.twitter.com/KrisJordan">twitter</a>)
<br />(<a href="mailto:krisjordan@gmail.com">e-mail</a>)</p>
</div>
</div>
<h3>For more information visit <a href="http://www.recessframework.org/">http://www.recessframework.org/</a></h3>
示例2: ReallyObnoxiousClass
<?php
Layout::extend('multiple');
$int = 1;
$string = 'foo';
class ReallyObnoxiousClass
{
}
$object = new ReallyObnoxiousClass();
示例3:
<?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>
示例4:
<?php
Layout::extend('layouts/theme');
$title = $theme->name . ' by ' . $theme->artist;
?>
<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';
示例5:
<?php
Layout::extend('layouts/database');
$title = 'Empty ' . $tableName;
?>
<h1><span class="highlight">Empty "<?php
echo $tableName;
?>
" table</span>?</h1>
<h2><a href="<?php
echo $controller->urlTo('showTable', $sourceName, $tableName);
?>
">No, Just Kidding, Take Me Back</a></h2>
<h2>This action cannot be undone.</h2>
<form method="POST" action="<?php
echo $controller->urlTo('emptyTablePost', $sourceName, $tableName);
?>
">
<input class="removed" type="submit" name="confirm" value="Yes, Empty it!" />
</form>
示例6:
<?php
Layout::extend('layouts/apps');
$title = 'New Application';
?>
<h1>New Application Walkthrough - Step 2</h1>
<?php
$form->begin();
?>
<h2 class="bottom">What's the url prefix to this app?</h2>
<p class="bottom">Examples: http://<?php
echo $_SERVER['SERVER_NAME'], $_ENV['url.base'];
?>
<strong>bar/</strong></p>
<?php
$form->input('routingPrefix');
?>
<?php
$form->input('appName');
$form->input('programmaticName');
?>
<input type="submit" value="Next Step" /><br /><br />
<?php
示例7:
<?php
Layout::extend('layouts/code');
$title = 'Class ' . $reflection->name;
?>
<?php
$parent = $reflector->parent();
if (isset($parent)) {
$parentPackage = $parent->package();
}
$children = $reflector->children();
?>
<div class="span-3 border left-sidebar">
<h3>Quick Links</h3>
<ul>
<?php
if (isset($table)) {
?>
<li class="loud">Model Info</li>
<ul>
<li><a href="#table">Table</a></li>
<li><a href="#source">Source</a></li>
<li><a href="#relationships">Relationships</a></li>
<li><a href="#columns">Columns</a></li>
</ul>
<?php
}
?>
<li class="loud">Class Info</li>
示例8:
<?php
Layout::extend('simple');
$string = 'simple';
示例10:
<?php
Layout::extend('layouts/routes');
$title = 'Home';
?>
<h2 class="bottom">Routes</h2>
<?php
$routes = RecessConf::getRoutes();
Part::draw('routes/table', $routes, '/recess');
示例11:
<?php
Layout::extend('middle.master');
Layout::input($string, 'string');
$string .= ' middle';
$number = 2;