本文整理汇总了PHP中Part::input方法的典型用法代码示例。如果您正苦于以下问题:PHP Part::input方法的具体用法?PHP Part::input怎么用?PHP Part::input使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Part
的用法示例。
在下文中一共展示了Part::input方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: HtmlAttributes
<?php
Part::input($type, 'string');
Part::input($id, 'string');
Part::input($name, 'string');
Part::input($value, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('nmc-controls-text'));
?>
<input <?php
echo $classes;
?>
id="<?php
echo $id;
?>
" name="<?php
echo $name;
?>
" type="<?php
echo $type;
?>
" <?php
echo $attrs;
if ($value != '') {
echo " value=\"{$value}\"";
}
?>
/>
示例2:
<?php
Part::input($form, 'ModelForm');
Part::input($title, 'string');
$form->begin();
?>
<fieldset>
<legend><?php
echo $title;
?>
</legend>
<?php
$form->input('{{primaryKey}}');
?>
{{editFields}}
<input type="submit" value="Save" />
</fieldset>
<?php
$form->end();
示例3: ceil
<?php
Part::input($controller, 'Controller');
Part::input($objects, 'ModelSet');
Part::input($columns, 'int', 4);
$count = $objects->count();
$perColumn = ceil($count / $columns);
echo '<table>';
for ($row = 0; $row < $perColumn; $row++) {
echo '<tr>';
for ($col = 0; $col < $columns; $col++) {
$object = isset($objects[$perColumn * $col + $row]) ? $objects[$perColumn * $col + $row] : '';
$value = is_object($object) ? $object->name : '';
if ($object instanceof RecessReflectorClass && $object->package() != null) {
$prefix = $object->package()->name . '.';
$linkTo = 'class';
} else {
$prefix = '';
$linkTo = 'package';
}
//$linkTo = get_class($object) == 'RecessReflectorClass' ? 'class' : 'package';
echo '<td><a href="', $controller->urlTo($linkTo . 'Info', $prefix . $value), '">', $value, '</a></td>';
}
echo '</tr>';
}
echo '</table>';
示例4:
<?php
Part::input($class, 'string');
Part::input($column, 'RecessColumnDescriptor');
?>
<tr<?php
if ($class != '') {
echo " class=\"{$class}\"";
}
?>
>
<td><?php
echo $column->isPrimaryKey ? 'Yes' : '';
?>
</td>
<td><?php
echo $column->name;
?>
</td>
<td><?php
echo $column->type;
?>
</td>
<td><?php
echo $column->nullable ? 'Y' : 'N';
?>
</td>
<td><?php
echo $column->defaultValue == '' ? 'N/A' : $column->defaultValue;
?>
</td>
示例5:
<?php
Part::input($items, 'array');
Part::input($even, 'Block');
Part::input($odd, 'Block');
$i = 0;
foreach ($items as $item) {
if ($i++ % 2 == 0) {
$even->draw($item);
} else {
$odd->draw($item);
}
}
示例6:
<?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>
示例7:
<?php
Part::input($first, 'string');
Part::input($second, 'int');
Part::input($third, 'string');
for ($i = 0; $i < $second; $i++) {
echo $first . $third;
}
示例8:
<?php
Part::input($items, 'array');
Part::input($block, 'Block');
foreach ($items as $item) {
$block->draw($item);
}
示例9: HtmlAttributes
<?php
Part::input($container, 'Container');
// $this
Part::input($name, 'string');
Part::input($children, 'ArrayBlock');
Part::input($defaultSkin, 'string', 'skins/dd-dt');
Part::input($legend, 'string');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('container-fieldset'));
?>
<!-- begin <?php
echo $name;
?>
container -->
<fieldset id="<?php
echo $container->getId();
?>
" <?php
echo $classes;
?>
<?php
echo $attrs;
?>
>
<legend><?php
echo $legend;
?>
</legend>
<dl class="containers-dl">
<?php
示例10:
<?php
Part::input($one, 'string');
echo $one;
示例11:
<?php
Part::input($container, 'Container');
// $this
Part::input($name, 'string');
Part::input($children, 'ArrayBlock');
Part::input($defaultSkin, 'string', 'skins/default');
?>
<!-- BEGIN <?php
echo $name;
?>
CONTAINER -->
<?php
echo $children;
?>
<!-- END <?php
echo $name;
?>
FIELDSET -->
示例12:
<?php
Part::input($optional, 'string', 'default');
if ($optional == 'default') {
echo 'default';
} else {
echo 'non-default';
}
示例13: HtmlAttributes
<?php
Part::input($id, 'string');
Part::input($name, 'string');
Part::input($value, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('html-textarea'));
?>
<textarea <?php
echo $classes;
?>
id="<?php
echo $id;
?>
" name="<?php
echo $name;
?>
" <?php
echo $attrs;
?>
>
<?php
echo $value;
?>
</textarea>
示例14: HtmlAttributes
<?php
Part::input($control, 'Control');
Part::input($name, 'string');
Part::input($value, 'string', '__false__');
Part::input($label, 'string', '');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('control-text'));
if ($value == '__true__') {
$attrs->set('checked', 'checked');
}
$value = '__true__';
$controlBlock = Part::block('html/input', 'checkbox', $control->getId(), $control->getFormName(), $value, $attrs, $classes);
Part::draw($control->getSkin(), $controlBlock, $label);
示例15: HtmlAttributes
<?php
Part::input($name, 'string');
Part::input($children, 'ArrayBlock');
Part::input($defaultSkin, 'string', 'skins/default');
Part::input($attrs, 'HtmlAttributes', new HtmlAttributes());
Part::input($classes, 'HtmlClasses', new HtmlClasses('containers-div'));
?>
<!-- begin <?php
echo $name;
?>
container -->
<div <?php
echo $classes;
?>
<?php
echo $attrs;
?>
>
<?php
echo $children;
?>
</div>
<!-- end <?php
echo $name;
?>
container -->