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


PHP Widget::input方法代码示例

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


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

示例1: viewSuccess

 protected function viewSuccess()
 {
     $this->Form->setAttribute('action', SYMPHONY_URL);
     $h2 = new XMLElement('h2', __('Updating Complete'));
     $this->Form->appendChild($h2);
     if (!empty($this->_params['post-notes'])) {
         $dl = new XMLElement('dl');
         foreach ($this->_params['post-notes'] as $version => $notes) {
             if ($notes) {
                 $dl->appendChild(new XMLElement('dt', $version));
                 foreach ($notes as $note) {
                     $dl->appendChild(new XMLElement('dd', $note));
                 }
             }
         }
         $this->Form->appendChild($dl);
     }
     $this->Form->appendChild(new XMLElement('p', __('And the crowd goes wild! A victory dance is in order; and look, your mum is watching. She\'s proud.', array(Symphony::Configuration()->get('sitename', 'general')))));
     $this->Form->appendChild(new XMLElement('p', __('Your mum is also nagging you about removing that %s directory before you log in.', array('<code>' . basename(INSTALL_URL) . '</code>'))));
     $submit = new XMLElement('div', null, array('class' => 'submit'));
     $submit->appendChild(Widget::input('submit', __('Complete'), 'submit'));
     $this->Form->appendChild($submit);
 }
开发者ID:nils-werner,项目名称:symphony-2,代码行数:23,代码来源:class.updaterpage.php

示例2: index

 function index(&$Page, &$Contents, $fields)
 {
     global $warnings;
     global $notices;
     global $languages;
     $Form = new XMLElement('form');
     $Form->setAttribute('action', kINSTALL_FILENAME . ($_GET['lang'] ? '?lang=' . $_GET['lang'] : ''));
     $Form->setAttribute('method', 'post');
     /** 
      *
      * START ENVIRONMENT SETTINGS 
      *
      **/
     $Environment = new XMLElement('fieldset');
     $Environment->appendChild(new XMLElement('legend', __('Environment Settings')));
     $Environment->appendChild(new XMLElement('p', __('Symphony is ready to be installed at the following location.')));
     $class = NULL;
     if (defined('kENVIRONMENT_WARNING') && kENVIRONMENT_WARNING == true) {
         $class = 'warning';
     }
     $Environment->appendChild(Widget::label(__('Root Path'), Widget::input('fields[docroot]', $fields['docroot']), $class));
     if (defined('ERROR') && defined('kENVIRONMENT_WARNING')) {
         $Environment->appendChild(new XMLElement('p', $warnings[ERROR], array('class' => 'warning')));
     }
     $Form->appendChild($Environment);
     /** END ENVIRONMENT SETTINGS **/
     /** 
      *
      * START LOCALE SETTINGS 
      *
      **/
     $Environment = new XMLElement('fieldset');
     $Environment->appendChild(new XMLElement('legend', __('Website Preferences')));
     //				$Environment->appendChild(new XMLElement('p', '.'));
     $Environment->appendChild(Widget::label(__('Name'), Widget::input('fields[general][sitename]', $fields['general']['sitename'])));
     $Fieldset = new XMLElement('fieldset');
     $Fieldset->appendChild(new XMLElement('legend', __('Date and Time')));
     $Fieldset->appendChild(new XMLElement('p', __('Customise how Date and Time values are displayed throughout the Administration interface.')));
     $options = array();
     $groups = array();
     $system_tz = isset($fields['region']['timezone']) ? $fields['region']['timezone'] : date_default_timezone_get();
     foreach (timezone_identifiers_list() as $tz) {
         if (preg_match('/\\//', $tz)) {
             $parts = preg_split('/\\//', $tz, 2, PREG_SPLIT_NO_EMPTY);
             $groups[$parts[0]][] = $parts[1];
         } else {
             $groups[$tz] = $tz;
         }
     }
     foreach ($groups as $key => $val) {
         if (is_array($val)) {
             $tmp = array('label' => $key, 'options' => array());
             foreach ($val as $zone) {
                 $tmp['options'][] = array("{$key}/{$zone}", "{$key}/{$zone}" == $system_tz, str_replace('_', ' ', $zone));
             }
             $options[] = $tmp;
         } else {
             $options[] = array($key, $key == $system_tz, str_replace('_', ' ', $key));
         }
     }
     $Fieldset->appendChild(Widget::label(__('Region'), Widget::Select('fields[region][timezone]', $options)));
     //$Div->appendChild(Widget::label('Date Format', Widget::input('fields[general][sitename]', $fields['general']['sitename'])));
     //$Div->appendChild(Widget::label('Time Format', Widget::input('fields[general][sitename]', $fields['general']['sitename'])));
     $dateformat = $fields['region']['date_format'];
     $label = Widget::Label(__('Date Format'));
     $dateFormats = array(array('Y/m/d', $dateformat == 'Y/m/d', DateTimeObj::get('Y/m/d')), array('m/d/Y', $dateformat == 'm/d/Y', DateTimeObj::get('m/d/Y')), array('m/d/y', $dateformat == 'm/d/y', DateTimeObj::get('m/d/y')), array('d F Y', $dateformat == 'd F Y', DateTimeObj::get('d F Y')));
     $label->appendChild(Widget::Select('fields[region][date_format]', $dateFormats));
     $Fieldset->appendChild($label);
     $timeformat = $fields['region']['time_format'];
     $label = Widget::Label(__('Time Format'));
     //$label->setAttribute('title', __('Local') . (date('I') == 1 ? ' daylight savings' : '') . ' time for ' . date_default_timezone_get());
     //if(date('I') == 1) $label->appendChild(new XMLElement('i', __('Daylight savings time')));
     $timeformats = array(array('H:i:s', $timeformat == 'H:i:s', DateTimeObj::get('H:i:s')), array('H:i', $timeformat == 'H:i', DateTimeObj::get('H:i')), array('g:i:s a', $timeformat == 'g:i:s a', DateTimeObj::get('g:i:s a')), array('g:i a', $timeformat == 'g:i a', DateTimeObj::get('g:i a')));
     $label->appendChild(Widget::Select('fields[region][time_format]', $timeformats));
     $Fieldset->appendChild($label);
     $Environment->appendChild($Fieldset);
     $Form->appendChild($Environment);
     /** END LOCALE SETTINGS **/
     /** 
      *
      * START DATABASE SETTINGS 
      *
      **/
     $Database = new XMLElement('fieldset');
     $Database->appendChild(new XMLElement('legend', __('Database Connection')));
     $Database->appendChild(new XMLElement('p', __('Please provide Symphony with access to a database.')));
     $class = NULL;
     if (defined('kDATABASE_VERSION_WARNING') && kDATABASE_VERSION_WARNING == true) {
         $class = ' warning';
     }
     ## fields[database][name]
     $label = Widget::label(__('Database'), Widget::input('fields[database][name]', $fields['database']['name']), $class);
     $Database->appendChild($label);
     if (defined('ERROR') && defined('kDATABASE_VERSION_WARNING')) {
         $Database->appendChild(new XMLElement('p', $warnings[ERROR], array('class' => 'warning')));
     }
     $class = NULL;
     if (defined('kDATABASE_CONNECTION_WARNING') && kDATABASE_CONNECTION_WARNING == true) {
         $class = ' warning';
     }
//.........这里部分代码省略.........
开发者ID:bauhouse,项目名称:sym-calendar,代码行数:101,代码来源:include.install.php

示例3: appendCondition

 protected function appendCondition(Duplicator $duplicator, $condition = array())
 {
     $document = $duplicator->ownerDocument;
     if (empty($condition)) {
         $item = $duplicator->createTemplate(__('Don\'t Execute When'));
     } else {
         $item = $duplicator->createInstance(__('Don\'t Execute When'));
     }
     if (!isset($condition['parameter'])) {
         $condition['parameter'] = null;
     }
     if (!isset($condition['logic'])) {
         $condition['logic'] = 'empty';
     }
     $group = $document->createElement('div');
     $group->setAttribute('class', 'group double');
     // Parameter
     $label = $document->createElement('label', __('Parameter'));
     $label->appendChild(Widget::input('fields[conditions][parameter][]', $condition['parameter']));
     $group->appendChild($label);
     // Logic
     $label = $document->createElement('label', __('Logic'));
     $label->appendChild(Widget::select('fields[conditions][logic][]', array(array('empty', $condition['logic'] == 'empty', __('is empty')), array('set', $condition['logic'] == 'set', __('is set'))), array('class' => 'filtered')));
     $group->appendChild($label);
     $group->appendChild($label);
     $item->appendChild($group);
 }
开发者ID:brendo,项目名称:symphony-3,代码行数:27,代码来源:class.datasource.php

示例4: update

 function update(&$Page, &$Contents)
 {
     /*
     		<form action="" method="post">
     			<h2>Update Symphony</h2>
     			<p>Symphony is ready to update from version 1.6.2 to version 1.6.3.</p>
     
     			<div class="submit">
     				<input name="action[update]" type="submit" value="Update Symphony" />
     				<input name="action[update]" type="hidden" value="true" />
     			</div>
     		</form>
     */
     $Form = new XMLElement('form');
     $Form->setAttribute('action', 'install.php');
     $Form->setAttribute('method', 'post');
     $Form->addChild(new XMLElement('h2', 'Update Symphony'));
     $Form->addChild(new XMLElement('p', 'Symphony is ready to update from version ' . kCURRENT_VERSION . ' to version ' . kVERSION));
     $Submit = new XMLElement('div');
     $Submit->setAttribute('class', 'submit');
     ### submit
     $Submit->addChild(Widget::input('submit', 'Update Symphony', NULL, 'submit'));
     ### action[update]
     $Submit->addChild(Widget::input('action[update' . kCURRENT_BUILD . ']', 'true', NULL, 'hidden'));
     $Form->addChild($Submit);
     $Contents->addChild($Form);
     $Page->setTemplateVar('title', 'Update Symphony');
     $Page->setTemplateVar('tagline', 'Version ' . kVERSION);
 }
开发者ID:symphonycms,项目名称:symphony-1.7,代码行数:29,代码来源:install.php


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