当前位置: 首页>>代码示例>>PHP>>正文


PHP Button::submit方法代码示例

本文整理汇总了PHP中Button::submit方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::submit方法的具体用法?PHP Button::submit怎么用?PHP Button::submit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Button的用法示例。


在下文中一共展示了Button::submit方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<?php

echo BootForm::open(['route' => ['sheets.remove_pilot', 'pilot_id' => $pilot->id, 'id' => $id]]);
echo BootForm::hidden('_action', 'remove_pilot');
echo Button::submit()->withValue('OK')->block();
echo BootForm::close();
开发者ID:Necrotex,项目名称:lootsheet,代码行数:6,代码来源:remove_pilot.php

示例2:

</h4>
				<p>Last login:
				<span data-toggle="tooltip" data-placement="top" title="<?php 
echo $user->updated_at;
?>
">
					<?php 
echo Carbon\Carbon::parse($user->updated_at)->diffForHumans();
?>
				</span></p>
			</div>
		</div>

		<div class="modal-footer">
			<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
			<?php 
if (!$user->admin) {
    echo BootForm::open(['route' => ['admin.promote_user', 'id' => $user->id]]);
    echo BootForm::hidden('_action', 'promote_user');
    echo Button::submit()->success()->withValue('Promote');
    echo BootForm::close();
} else {
    echo BootForm::open(['route' => ['admin.demote_user', 'id' => $user->id]]);
    echo BootForm::hidden('_action', 'demote_user');
    echo Button::submit()->danger()->withValue('Demote');
    echo BootForm::close();
}
?>
		</div>
	</div><!-- /.modal-content -->
开发者ID:Necrotex,项目名称:lootsheet,代码行数:30,代码来源:admin_user_info_content.php

示例3: function

        return Button::link(URL::route($resourceName . '.create'), $buttonValue);
    }
});
// Show "Edit" button for a specific resource
HTML::macro('resourceUpdate', function ($resourceName, $resourceItem, $buttonValue) {
    $resourceItemId = is_object($resourceItem) ? $resourceItem->id : $resourceItem;
    if (Authority::can('update', $resourceName, $resourceItem)) {
        return Button::link(URL::route($resourceName . '.edit', array($resourceName => $resourceItemId)), $buttonValue);
    }
});
// Show "Delete" button for a specific resource
HTML::macro('resourceDelete', function ($resourceName, $resourceItem, $buttonValue) {
    $resourceItemId = is_object($resourceItem) ? $resourceItem->id : $resourceItem;
    if (Authority::can('delete', $resourceName, $resourceItem)) {
        $output = Form::open(array('route' => array($resourceName . '.destroy', $resourceItemId), 'method' => 'DELETE', 'data-confirm' => 'Are you sure?', 'class' => 'resource-destroy'));
        $output .= Button::submit($buttonValue, array('title' => 'Delete ' . $resourceName));
        $output .= Form::close();
        return $output;
    }
});
// Show user avatar with status info
HTML::macro('userAvatar', function ($user, $size = 'small', $classes = array()) {
    if (!is_array($classes)) {
        $classes = array($classes);
    }
    $classes[] = 'avatar';
    $classes[] = 'avatar-' . $size;
    $state = $user->states()->latest()->first();
    if (count($state)) {
        if (isset($state->application_id)) {
            $classes[] = 'in-game';
开发者ID:zeropingheroes,项目名称:lanager-core,代码行数:31,代码来源:macros.php

示例4: submit

 /**
  * Submits data to the button.
  *
  * @param null|string $submittedData The data.
  * @param bool        $clearMissing  Not used.
  *
  * @return SubmitButton The button instance
  *
  * @throws Exception\AlreadySubmittedException If the form has already been submitted.
  */
 public function submit($submittedData, $clearMissing = true)
 {
     parent::submit($submittedData, $clearMissing);
     $this->clicked = null !== $submittedData;
     return $this;
 }
开发者ID:BusinessCookies,项目名称:CoffeeMachineProject,代码行数:16,代码来源:SubmitButton.php

示例5: number_format

<?php

echo BootForm::open(['route' => ['sheets.mark_as_paid', $site->id]]);
echo BootForm::hidden('_action', 'mark_as_paid');
echo BootForm::text('payout', 'Corp Cut', number_format($site->sheet->corp_cut, 2, '.', ''), ['readonly']);
echo Button::submit()->withValue('Mark as Paid')->block();
echo BootForm::close();
开发者ID:Necrotex,项目名称:lootsheet,代码行数:7,代码来源:mark_as_paid.php


注:本文中的Button::submit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。