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


PHP Tag::submitButton方法代碼示例

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


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

示例1: render

 /**
  * Renders the element widget
  *
  * @param array|null $attributes
  * @return string
  * @throws Exception
  */
 public function render($attributes = null)
 {
     if (is_array($attributes) === false && is_null($attributes) === false) {
         throw new Exception('Invalid parameter type.');
     }
     return Tag::submitButton($this->prepareAttributes($attributes));
 }
開發者ID:aisuhua,項目名稱:phalcon-php,代碼行數:14,代碼來源:Submit.php

示例2: registryFunctions

 /**
  * Registers common function in Twig
  *
  * @param \Phalcon\Mvc\ViewInterface $view
  * @param \Phalcon\DiInterface       $di
  * @param array                      $userFunctions
  */
 protected function registryFunctions($view, DiInterface $di, $userFunctions = array())
 {
     $options = array('is_safe' => array('html'));
     $functions = array(new \Twig_SimpleFunction('content', function () use($view) {
         return $view->getContent();
     }, $options), new \Twig_SimpleFunction('partial', function ($partialPath) use($view) {
         return $view->partial($partialPath);
     }, $options), new \Twig_SimpleFunction('linkTo', function ($parameters, $text = null) {
         return \Phalcon\Tag::linkTo($parameters, $text);
     }, $options), new \Twig_SimpleFunction('textField', function ($parameters) {
         return \Phalcon\Tag::textField($parameters);
     }, $options), new \Twig_SimpleFunction('passwordField', function ($parameters) {
         return \Phalcon\Tag::passwordField($parameters);
     }, $options), new \Twig_SimpleFunction('hiddenField', function ($parameters) {
         return \Phalcon\Tag::hiddenField($parameters);
     }, $options), new \Twig_SimpleFunction('fileField', function ($parameters) {
         return \Phalcon\Tag::fileField($parameters);
     }, $options), new \Twig_SimpleFunction('checkField', function ($parameters) {
         return \Phalcon\Tag::checkField($parameters);
     }, $options), new \Twig_SimpleFunction('radioField', function ($parameters) {
         return \Phalcon\Tag::radioField($parameters);
     }, $options), new \Twig_SimpleFunction('submitButton', function ($parameters) {
         return \Phalcon\Tag::submitButton($parameters);
     }, $options), new \Twig_SimpleFunction('selectStatic', function ($parameters, $data = array()) {
         return \Phalcon\Tag::selectStatic($parameters, $data);
     }, $options), new \Twig_SimpleFunction('select', function ($parameters, $data = array()) {
         return \Phalcon\Tag::select($parameters, $data);
     }, $options), new \Twig_SimpleFunction('textArea', function ($parameters) {
         return \Phalcon\Tag::textArea($parameters);
     }, $options), new \Twig_SimpleFunction('form', function ($parameters = array()) {
         return \Phalcon\Tag::form($parameters);
     }, $options), new \Twig_SimpleFunction('endForm', function () {
         return \Phalcon\Tag::endForm();
     }, $options), new \Twig_SimpleFunction('getTitle', function () {
         return \Phalcon\Tag::getTitle();
     }, $options), new \Twig_SimpleFunction('stylesheetLink', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::stylesheetLink($parameters, $local);
     }, $options), new \Twig_SimpleFunction('javascriptInclude', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::javascriptInclude($parameters, $local);
     }, $options), new \Twig_SimpleFunction('image', function ($parameters) {
         return \Phalcon\Tag::image($parameters);
     }, $options), new \Twig_SimpleFunction('friendlyTitle', function ($text, $separator = null, $lowercase = true) {
         return \Phalcon\Tag::friendlyTitle($text, $separator, $lowercase);
     }, $options), new \Twig_SimpleFunction('getDocType', function () {
         return \Phalcon\Tag::getDocType();
     }, $options), new \Twig_SimpleFunction('getSecurityToken', function () use($di) {
         return $di->get("security")->getToken();
     }, $options), new \Twig_SimpleFunction('getSecurityTokenKey', function () use($di) {
         return $di->get("security")->getTokenKey();
     }, $options), new \Twig_SimpleFunction('url', function ($route) use($di) {
         return $di->get("url")->get($route);
     }, $options));
     if (!empty($userFunctions)) {
         $functions = array_merge($functions, $userFunctions);
     }
     foreach ($functions as $function) {
         $this->twig->addFunction($function);
     }
 }
開發者ID:lisong,項目名稱:incubator,代碼行數:66,代碼來源:Twig.php

示例3: registryFunctions

 /**
  * Registers common function in Twig
  *
  * @param \Phalcon\Mvc\ViewInterface $view
  */
 private function registryFunctions($view)
 {
     $options = array('is_safe' => array('html'));
     $functions = array(new \Twig_SimpleFunction('content', function () use($view) {
         return $view->getContent();
     }, $options), new \Twig_SimpleFunction('partial', function ($partialPath) use($view) {
         return $view->partial($partialPath);
     }, $options), new \Twig_SimpleFunction('linkTo', function ($parameters, $text = null) {
         return \Phalcon\Tag::linkTo($parameters, $text);
     }, $options), new \Twig_SimpleFunction('textField', function ($parameters) {
         return \Phalcon\Tag::textField($parameters);
     }, $options), new \Twig_SimpleFunction('passwordField', function ($parameters) {
         return \Phalcon\Tag::passwordField($parameters);
     }, $options), new \Twig_SimpleFunction('hiddenField', function ($parameters) {
         return \Phalcon\Tag::hiddenField($parameters);
     }, $options), new \Twig_SimpleFunction('fileField', function ($parameters) {
         return \Phalcon\Tag::fileField($parameters);
     }, $options), new \Twig_SimpleFunction('checkField', function ($parameters) {
         return \Phalcon\Tag::checkField($parameters);
     }, $options), new \Twig_SimpleFunction('radioField', function ($parameters) {
         return \Phalcon\Tag::radioField($parameters);
     }, $options), new \Twig_SimpleFunction('submitButton', function ($parameters) {
         return \Phalcon\Tag::submitButton($parameters);
     }, $options), new \Twig_SimpleFunction('selectStatic', function ($parameters, $data = []) {
         return \Phalcon\Tag::selectStatic($parameters, $data);
     }, $options), new \Twig_SimpleFunction('select', function ($parameters, $data = []) {
         return \Phalcon\Tag::select($parameters, $data);
     }, $options), new \Twig_SimpleFunction('textArea', function ($parameters) {
         return \Phalcon\Tag::textArea($parameters);
     }, $options), new \Twig_SimpleFunction('form', function ($parameters = []) {
         return \Phalcon\Tag::form($parameters);
     }, $options), new \Twig_SimpleFunction('endForm', function () {
         return \Phalcon\Tag::endForm();
     }, $options), new \Twig_SimpleFunction('getTitle', function () {
         return \Phalcon\Tag::getTitle();
     }, $options), new \Twig_SimpleFunction('getTitle', function () {
         return \Phalcon\Tag::getTitle();
     }, $options), new \Twig_SimpleFunction('stylesheetLink', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::stylesheetLink($parameters, $local);
     }, $options), new \Twig_SimpleFunction('javascriptInclude', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::javascriptInclude($parameters, $local);
     }, $options), new \Twig_SimpleFunction('image', function ($parameters) {
         return \Phalcon\Tag::image($parameters);
     }, $options), new \Twig_SimpleFunction('friendlyTitle', function ($text, $separator = null, $lowercase = true) {
         return \Phalcon\Tag::friendlyTitle($text, $separator, $lowercase);
     }, $options), new \Twig_SimpleFunction('getDocType', function () {
         return \Phalcon\Tag::getDocType();
     }, $options));
     foreach ($functions as $function) {
         $this->_twig->addFunction($function);
     }
 }
開發者ID:tashik,項目名稱:phalcon_core,代碼行數:57,代碼來源:Twig.php

示例4:

<?php

use Phalcon\Tag;
?>

<!-- Sending the form by method POST -->
<?php 
echo Tag::form("products/search");
?>
<label for="q">Search:</label>
<?php 
echo Tag::textField("q");
echo Tag::submitButton("Search");
?>
</form>

<!-- Specyfing another method or attributes for the FORM tag -->
<?php 
echo Tag::form(array("products/search", "method" => "get"));
?>
<label for="q">Search:</label>
<?php 
echo Tag::textField("q");
echo Tag::submitButton("Search");
?>
</form>

開發者ID:aodkrisda,項目名稱:phalcon-code,代碼行數:26,代碼來源:tags-121.php

示例5:

<?php

use Phalcon\Tag;
?>
<section>
    <header>
        <h1>搜索</h1>
    </header>
    <form action="/search" method="post">
        <p>
            <label for="search">
                <?php 
echo Tag::textField(['search', 'class' => 'search', 'autofocus' => 'true']);
?>
            </label>
        </p>

        <p>
            <?php 
echo Tag::submitButton(['submitSearch', 'class' => 'submitSearch', 'value' => '搜索']);
?>
        </p>
        <img src="/a.jpg" >
    </form>
</section>
開發者ID:justforleo,項目名稱:phalcon-cmf,代碼行數:25,代碼來源:_library_webserver_documents_pro_app_controllers_frontend_views_index_index.volt.php

示例6: submitButton

 public static function submitButton($parameters)
 {
     return parent::submitButton($parameters);
 }
開發者ID:mattvb91,項目名稱:cphalcon,代碼行數:4,代碼來源:Tag.php

示例7: testSubmitButtonDisplayToElementNotPresentXHTML

 /**
  * Tests submitButton with displayTo to an non existent element
  *
  * @author Nikos Dimopoulos <nikos@phalconphp.com>
  * @since  2012-10-26
  * @todo   Fix the order
  */
 public function testSubmitButtonDisplayToElementNotPresentXHTML()
 {
     \Phalcon\Tag::setDoctype(\Phalcon\Tag::XHTML10_STRICT);
     $options = array('some_field_name', 'class' => 'some_class', 'size' => '10');
     \Phalcon\Tag::displayTo('some_field', 'some_default_value');
     $expected = '<input type="submit" value="some_field_name" class="some_class" size="10" />';
     $actual = \Phalcon\Tag::submitButton($options);
     \Phalcon\Tag::displayTo('some_field', '');
     \Phalcon\Tag::setDoctype('');
     $this->assertEquals($expected, $actual, sprintf($this->message, 'XHTML submitButton with displayTo'));
 }
開發者ID:lisong,項目名稱:cphalcon,代碼行數:18,代碼來源:UnitTest.php

示例8:

?>

<h2>Sign using this form</h2>

<?php 
echo Tag::form("signup/register");
?>

<p>
    <label for="name">Name</label>
    <?php 
echo Tag::textField("name");
?>
</p>

<p>
    <label for="name">E-Mail</label>
    <?php 
echo Tag::textField("email");
?>
</p>

<p>
    <?php 
echo Tag::submitButton("Register");
?>
</p>

</form>

開發者ID:aodkrisda,項目名稱:phalcon-code,代碼行數:29,代碼來源:tutorial-285.php

示例9:

<?php

use Phalcon\Tag;
?>
<h2>サインアップ</h2>
<?php 
echo Tag::form("signup/register");
?>
<p>
<label for="name">お名前</label>
<?php 
echo Tag::textField("name");
?>
</p>
<p>
<label for="email">E-Mail</label>
<?php 
echo Tag::textField("email");
?>
</p>
<p>
<?php 
echo Tag::submitButton("登録");
?>
</p>
</form>
開發者ID:haruya,項目名稱:phalcon,代碼行數:26,代碼來源:c__pleiades_xampp_htdocs_phalcon_app_views_signup_index.volt.php

示例10: submitButton

 /**
  * Create checkfield with bootstrap style
  * @param string $text
  * @param array $params
  * @return string
  */
 public function submitButton($text, $params = [])
 {
     if (!isset($params['class'])) {
         $params['class'] = 'btn btn-primary';
     }
     array_unshift($params, $text);
     return Tag::submitButton($params);
 }
開發者ID:wataridori,項目名稱:bphalcon,代碼行數:14,代碼來源:BForm.php


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