本文整理汇总了PHP中Part::block方法的典型用法代码示例。如果您正苦于以下问题:PHP Part::block方法的具体用法?PHP Part::block怎么用?PHP Part::block使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Part
的用法示例。
在下文中一共展示了Part::block方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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/master');
Layout::input($title, 'string');
Layout::input($body, 'Block');
$navigation = Part::block('parts/navigation');
示例3: testInputTypeFail
function testInputTypeFail()
{
try {
Part::block($this->optional, 1)->draw();
$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));
}
}
示例4: array
<?php
Part::input($control, 'Control');
Part::input($name, 'string');
Part::input($value, 'array', array());
Part::input($label, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('control-checkbox-array'));
Part::input($choices, 'array');
$controlBlock = Part::block('html/checkbox-array', $control->getId(), $control->getFormName(), $value, $attrs, $classes, $choices);
Part::draw($control->getSkin(), $controlBlock, $label);
示例5: 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-select'));
Part::input($choices, 'array');
$controlBlock = Part::block('html/select', $control->getId(), $control->getFormName(), $value, $attrs, $classes, $choices);
Part::draw($control->getSkin(), $controlBlock, $label);
示例6:
<?php
Layout::extend('layouts/master');
Layout::input($body, 'Block');
Layout::input($title, 'string');
$title .= ' > Home > ';
$navigation = Part::block('layouts/navigation', '');
示例7: HtmlBlock
<?php
Layout::extend('layouts/master');
Layout::input($title, 'string');
Layout::input($body, 'Block');
Layout::input($scripts, 'Block', new HtmlBlock());
$title .= ' > Database > ';
$navigation = Part::block('layouts/navigation', 'Database');
示例8: 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-textarea'));
$controlBlock = Part::block('html/textarea', $control->getId(), $control->getFormName(), $value, $attrs, $classes);
Part::draw($control->getSkin(), $controlBlock, $label);
示例9: 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-text'));
$controlBlock = Part::block('html/input', 'password', $control->getId(), $control->getFormName(), '', $attrs, $classes);
Part::draw($control->getSkin(), $controlBlock, $label);
示例10:
?>
</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>