當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。