本文整理汇总了PHP中Part::draw方法的典型用法代码示例。如果您正苦于以下问题:PHP Part::draw方法的具体用法?PHP Part::draw怎么用?PHP Part::draw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Part
的用法示例。
在下文中一共展示了Part::draw方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HtmlAttributes
<?php
Part::input($control, 'Control');
Part::input($name, 'string');
Part::input($value, 'string', '');
Part::input($label, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('control-submit'));
$controlBlock = Part::block('html/input', 'submit', $control->getId(), $control->getFormName(), $value, $attrs, $classes);
Part::draw($control->getSkin(), $controlBlock, $label);
示例2:
<?php
Layout::extend('layouts/code');
$title = 'Code Browser';
?>
<h1>Code Browser</h1>
<?php
if (count($packages) == 0) {
?>
<h3><a href="<?php
echo $controller->urlTo('index');
?>
">First time here? Index your code. (Note: this can take a few, please be patient!)</a></h3>
<?php
}
?>
<h2>By Package</h2>
<?php
Part::draw('code/table', $controller, $packages);
?>
<h2>By Class</h2>
<?php
Part::draw('code/table', $controller, $classes);
?>
<a href="<?php
echo $controller->urlTo('index');
?>
">Re-index your Code</a>
示例3: HtmlBlock
<?php
Layout::input($title, 'string');
Layout::input($body, 'Block');
Layout::input($navigation, 'Block', new HtmlBlock());
Layout::input($style, 'Block', new HtmlBlock());
?>
<html>
<head>
<?php
if (!$style->draw()) {
Part::draw('parts/style');
}
?>
<title>{{appName}} - <?php
echo $title;
?>
</title>
</head>
<body>
<div class="container">
<div class="span-24">
<h1>{{appName}}</h1>
</div>
<div class="span-24 last">
<div class="navigation">
<?php
echo $navigation;
?>
</div>
<?php
示例4: substr
<?php
Part::input($routes, 'RtNode');
Part::input($omit, 'string');
$fullPath = $_ENV['url.base'];
if (strrpos($fullPath, '/') == strlen($fullPath) - 1) {
$fullPath = substr($fullPath, 0, -1);
}
if (!isset($omit)) {
$omit = '';
}
?>
<table>
<thead><td>HTTP</td><td>Route</td><td>Controller</td><td>Method</td></thead>
<tbody>
<?php
Part::draw('routes/rows', $routes, $fullPath, $omit);
?>
</tbody>
</table>
示例5:
<?php
/*== Part Inputs ==*/
// selected: The name of the selected navigation item
Part::input($selected, 'string');
/*=================*/
?>
<div class="span-19 navigation last">
<ul>
<?php
Part::draw('layouts/navigation-item', 'RecessToolsAppsController::home', 'Apps', $selected);
?>
<?php
Part::draw('layouts/navigation-item', 'RecessToolsDatabaseController::home', 'Database', $selected);
?>
<?php
Part::draw('layouts/navigation-item', 'RecessToolsCodeController::home', 'Code', $selected);
?>
<?php
Part::draw('layouts/navigation-item', 'RecessToolsRoutesController::home', 'Routes', $selected);
?>
</ul>
</div>
示例6:
<?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');
示例7: RtNode
</div>
<div class="span-5 last">
<h2 class="bottom">Views</h2>
<p>Location: <?php
echo $app->viewsDir;
?>
</p>
</div>
<hr />
<h2 class="bottom">Routes</h2>
<p class="bottom">Route Prefix: <?php
echo $app->routingPrefix;
?>
</p>
<?php
$routes = new RtNode();
$app->addRoutesToRouter($routes);
// include_once($viewsDir . 'common/printRoutes.php');
Part::draw('routes/table', $routes, '');
?>
<hr />
<p>Trying to <a href="<?php
echo $controller->urlTo('uninstall', get_class($app));
?>
">uninstall <?php
echo $app->name;
?>
</a>?</p>
示例8: ksort
?>
</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);
}
}
?>
示例9:
?>
</strong></h1>
<h2>Source: <?php
echo $sourceName;
?>
</h2>
<h2>Columns:</h2>
<table>
<thead>
<tr>
<td>Primary</td>
<td>Column Name</td>
<td>Type</td>
<td>Nullable</td>
<td>Default Value</td>
</tr>
</thead>
<tbody>
<?php
Part::draw('each-toggle', $columns, Part::block('database/row', ''), Part::block('database/row', 'light'));
?>
</tbody>
</table>
<hr />
<h3><a href="<?php
echo $controller->urlTo('emptyTable', $sourceName, $table);
?>
">Empty Table</a> - <a href="<?php
echo $controller->urlTo('dropTable', $sourceName, $table);
?>
">Drop Table</a></h3>
示例10: testInputTypeFail
function testInputTypeFail()
{
try {
Part::draw($this->optional, 1);
$this->fail('Should throw InputTypeCheckException');
} catch (InputTypeCheckException $e) {
$this->assertTrue(true);
} catch (Exception $e) {
print $e->getMessage();
$this->fail('Should throw InputTypeCheckException, Got: ' . get_class($e));
}
}
示例11: array
<?php
Part::input($id, 'string');
Part::input($name, 'string');
Part::input($value, 'array', array());
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('nmc-controls-checkbox-array'));
Part::input($choices, 'array');
$i = 0;
$name = $name . '[]';
foreach ($choices as $key => $choiceValue) {
$i++;
$boxId = $id . '_' . $choiceValue;
$attrs = new HtmlAttributes();
if (in_array($choiceValue, $value)) {
$attrs->set('checked', 'checked');
}
Part::draw('html/input', 'checkbox', $boxId, $name, (string) $choiceValue, $attrs, $classes);
echo '<label for="' . $boxId . '">' . $key . '</label><br />';
}