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


PHP FormHelper::password方法代碼示例

本文整理匯總了PHP中FormHelper::password方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormHelper::password方法的具體用法?PHP FormHelper::password怎麽用?PHP FormHelper::password使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FormHelper的用法示例。


在下文中一共展示了FormHelper::password方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testPassword

 public function testPassword()
 {
     //test where valueOrArray is array
     $html = $this->object->password('element', array('arbitrary' => 'arbitrary', 'class' => 'test-class'));
     $this->assertAttributes($html, array('class' => array('test-class', 'ccm-input-password'), 'arbitrary' => 'arbitrary', 'type' => 'password'));
     //test where valueOrArray is value
     $html = $this->object->password('element', 'value', array('arbitrary' => 'arbitrary', 'class' => 'test-class'));
     $this->assertAttributes($html, array('class' => array('test-class', 'ccm-input-password'), 'value' => 'value', 'arbitrary' => 'arbitrary', 'type' => 'password'));
 }
開發者ID:notzen,項目名稱:concrete5-tests,代碼行數:9,代碼來源:FormHelperTest.php

示例2: array

<?php

FormHelper::create('loginForm');
FormHelper::input('email', "E-mail", Request::post('email'), array('placeholder' => 'Digite o seu e-mail', 'style' => 'max-width:400px', 'validation' => array('regex' => FormHelper::EMAIL, 'message' => 'Digite um <strong>E-mail</strong> válido.')));
FormHelper::password('password', "Senha", Request::post('password'), array('placeholder' => 'Digite o sua senha', 'style' => 'max-width:400px;', 'validation' => array('regex' => FormHelper::NOT_EMPTY, 'message' => 'Digite uma <strong>Senha</strong> para logar.')));
?>
<br/><?php 
FormHelper::startGroup();
FormHelper::submitAjax("Enviar", "auth", array('class' => 'button'));
FormHelper::endGroup();
FormHelper::end();
開發者ID:neurosoftbrasil,項目名稱:adminns,代碼行數:11,代碼來源:index.php

示例3:

</label>
        <div class="col-sm-10">
            <?php 
echo FormHelper::textbox('Login', $this->getModel()->Login);
?>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="password_field"><?php 
echo $this->getModel()->fieldTitle('Password');
?>
</label>
        <div class="col-sm-10">
            <?php 
echo FormHelper::password('Password');
?>
        </div>
    </div>

    <div class="form-group">
        <div class="controls">
            <div class="col-sm-offset-2 col-sm-10 checkbox-group">
                <label class="col-sm-10" for="field_RememberMe">
                    <?php 
echo FormHelper::checkbox('RememberMe');
?>
                    <?php 
echo $this->getModel()->fieldTitle('RememberMe');
?>
                </label>
開發者ID:ruxon,項目名稱:app,代碼行數:31,代碼來源:Login.tpl.php

示例4: testInputPassword

 public function testInputPassword()
 {
     $this->assertEqual(FormHelper::password('name', 'value', array('class' => 'myClass')), '<input type="password" name="name" class="myClass" value="value" id="name">');
     $this->assertEqual(FormHelper::password('name', $this->Model, array('class' => 'myClass')), '<input type="password" name="name" class="myClass" value="obj" id="name">');
 }
開發者ID:nicolasmartin,項目名稱:framework,代碼行數:5,代碼來源:helper.form.php

示例5: render

 public function render()
 {
     echo FormHelper::password($this->getAlias(), $this->getValue(), array('class' => 'TextboxField', 'id' => 'field_' . $this->getAlias()));
 }
開發者ID:ruxon,項目名稱:module-ruxon,代碼行數:4,代碼來源:RuxonFormViewPasswordColumn.class.php


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