本文整理匯總了PHP中TbHtml::btn方法的典型用法代碼示例。如果您正苦於以下問題:PHP TbHtml::btn方法的具體用法?PHP TbHtml::btn怎麽用?PHP TbHtml::btn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TbHtml
的用法示例。
在下文中一共展示了TbHtml::btn方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: render
/**
* Returns this button.
* @return string the rendering result.
*/
public function render()
{
$attributes = $this->attributes;
$attributes['name'] = $this->name;
if (isset(self::$coreTypes[$this->type])) {
$type = self::$coreTypes[$this->type];
return TbHtml::btn($type, $this->label, $attributes);
} else {
return $this->getParent()->getOwner()->widget($this->type, $attributes, true);
}
}
示例2: array
<div class="row">
<div class="span6 offset3 well">
<h3 class="text-center"><?php
echo Yii::t('app', 'Recovery user password');
?>
</h3>
<?php
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'recovery-password-form', 'layout' => TbHtml::FORM_LAYOUT_HORIZONTAL));
?>
<p class="muted text-center">
<?php
echo Yii::t('app', 'Please input your email address below, you will be sent a link to reset your password.');
?>
<?php
echo $form->errorSummary($model);
?>
<?php
echo $form->textFieldControlGroup($model, 'email', array('class' => 'span4', 'placeholder' => Yii::t('app', 'email')));
?>
<?php
echo TbHtml::formActions(array(TbHtml::submitButton(Yii::t('user', 'Recovery password'), array('color' => TbHtml::BUTTON_COLOR_SUCCESS)), TbHtml::btn(TbHtml::BUTTON_TYPE_LINK, Yii::t('user', 'Remember password?'), array('color' => TbHtml::BUTTON_COLOR_LINK, 'url' => '/user/login'))));
?>
<?php
$this->endWidget();
?>
</div>
</div><!-- form -->
示例3: array
<?php
echo $form->errorSummary($model);
?>
<?php
echo $form->textFieldControlGroup($model, 'username', array('placeholder' => Yii::t('app', 'username')));
?>
<?php
echo $form->textFieldControlGroup($model, 'email', array('placeholder' => Yii::t('app', 'email')));
?>
<?php
echo $form->passwordFieldControlGroup($model, 'password', array('placeholder' => Yii::t('app', 'password')));
?>
<?php
echo TbHtml::formActions(array(TbHtml::submitButton(Yii::t('user', 'Sign Up!'), array('color' => TbHtml::BUTTON_COLOR_SUCCESS))));
?>
<?php
$this->endWidget();
?>
<div class="well">
<div class="span3 offset1">
<?php
echo TbHtml::btn(TbHtml::BUTTON_TYPE_LINK, Yii::t('user', 'Already registered?'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY, 'url' => '/user/login'));
?>
</div>
</div>
</div>
</div>
示例4: render
/**
* Returns this button.
* @return string the rendering result.
*/
public function render()
{
return TbHtml::btn($this->type, $this->label, $this->attributes);
}
示例5: array
//echo $form->errorSummary($model);
?>
<?php
echo $form->textFieldControlGroup($model, 'username', array('class' => 'span3', 'placeholder' => Yii::t('user', 'username or email')));
?>
<?php
echo $form->passwordFieldControlGroup($model, 'password', array('class' => 'span3', 'placeholder' => Yii::t('user', 'password')));
?>
<?php
echo TbHtml::formActions(array(TbHtml::submitButton(Yii::t('user', 'Log In'), array('color' => TbHtml::BUTTON_COLOR_PRIMARY)), TbHtml::btn(TbHtml::BUTTON_TYPE_LINK, Yii::t('user', 'Forgot password?'), array('color' => TbHtml::BUTTON_COLOR_LINK, 'url' => '/user/passrecovery'))));
?>
<?php
$this->endWidget();
?>
<div class='well'>
<div class="span2"><?php
echo Yii::t('user', 'New user?');
?>
</div>
<div class="span2">
<?php
echo TbHtml::btn(TbHtml::BUTTON_TYPE_LINK, Yii::t('user', 'Sign Up!'), array('color' => TbHtml::BUTTON_COLOR_SUCCESS, 'url' => '/user/registration'));
?>
</div>
</div>
</div>
</div>