當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Part::input方法代碼示例

本文整理匯總了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}\"";
}
?>
/>
開發者ID:amitshukla30,項目名稱:recess,代碼行數:28,代碼來源:input.part.php

示例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();
開發者ID:amitshukla30,項目名稱:recess,代碼行數:20,代碼來源:form.part.template.php

示例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>';
開發者ID:KrisJordan,項目名稱:recess,代碼行數:26,代碼來源:table.part.php

示例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>
開發者ID:amitshukla30,項目名稱:recess,代碼行數:31,代碼來源:row.part.php

示例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);
    }
}
開發者ID:amitshukla30,項目名稱:recess,代碼行數:13,代碼來源:each-toggle.part.php

示例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>
開發者ID:ratz,項目名稱:icon-harvester,代碼行數:24,代碼來源:details.part.php

示例7:

<?php

Part::input($first, 'string');
Part::input($second, 'int');
Part::input($third, 'string');
for ($i = 0; $i < $second; $i++) {
    echo $first . $third;
}
開發者ID:amitshukla30,項目名稱:recess,代碼行數:8,代碼來源:multi-input.part.php

示例8:

<?php

Part::input($items, 'array');
Part::input($block, 'Block');
foreach ($items as $item) {
    $block->draw($item);
}
開發者ID:amitshukla30,項目名稱:recess,代碼行數:7,代碼來源:each.part.php

示例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 
開發者ID:amitshukla30,項目名稱:recess,代碼行數:31,代碼來源:fieldset.part.php

示例10:

<?php

Part::input($one, 'string');
echo $one;
開發者ID:amitshukla30,項目名稱:recess,代碼行數:4,代碼來源:single-input.part.php

示例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 -->
開發者ID:amitshukla30,項目名稱:recess,代碼行數:19,代碼來源:default.part.php

示例12:

<?php

Part::input($optional, 'string', 'default');
if ($optional == 'default') {
    echo 'default';
} else {
    echo 'non-default';
}
開發者ID:amitshukla30,項目名稱:recess,代碼行數:8,代碼來源:optional-inputs.part.php

示例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>
開發者ID:amitshukla30,項目名稱:recess,代碼行數:25,代碼來源:textarea.part.php

示例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);
開發者ID:amitshukla30,項目名稱:recess,代碼行數:14,代碼來源:checkbox.part.php

示例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 -->
開發者ID:amitshukla30,項目名稱:recess,代碼行數:27,代碼來源:div.part.php


注:本文中的Part::input方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。