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


PHP TextField::name方法代碼示例

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


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

示例1: _createSliceConfigUploadForm

 /**
  * @param $config SliceConfig
  * @return Form
  */
 public function _createSliceConfigUploadForm($config)
 {
     $form = new Form('upload');
     //load up our engines.
     if (User::isAdmin()) {
         $engines = SliceEngine::getAllEngines()->getAll();
     } else {
         $engines = SliceEngine::getPublicEngines()->getAll();
     }
     $engs = array();
     foreach ($engines as $row) {
         /* @var $e SliceEngine */
         $e = $row['SliceEngine'];
         $engs[$e->id] = $e->getName();
     }
     $form->add(SelectField::name('engine_id')->label('Slice Engine')->help('Which slicing engine does this config use?')->required(true)->value($config->get('engine_id'))->options($engs));
     $form->add(TextField::name('config_name')->label('Config Name')->help('What is the name of this slicing configuration.')->required(true)->value($config->get('config_name')));
     if ($config->isHydrated()) {
         $form->add(CheckboxField::name('expire_slicejobs')->label('Expire Old Slice Jobs')->help('If checked, old slice jobs will be expired and never re-used.')->value(1));
     }
     $form->add(UploadField::name('config_file')->label('Configuration File')->help('The configuration file to use (.ini for Slic3r)')->required(true));
     return $form;
 }
開發者ID:JoonasMelin,項目名稱:BotQueue,代碼行數:27,代碼來源:slicer.php

示例2: _createInfoForm

 /**
  * @param $bot Bot is the selected bot
  * @return Form the form we return
  */
 private function _createInfoForm($bot)
 {
     $form = new Form('info');
     if ($this->args('setup')) {
         $form->action = $bot->getUrl() . "/edit/setup";
     } else {
         $form->action = $bot->getUrl() . "/edit";
     }
     $form->add(DisplayField::name('title')->label('')->value('<h2>Information / Details</h2>'));
     $form->add(TextField::name('name')->label('Bot Name')->help('What should humans call your bot?')->required(true)->value($bot->get('name')));
     $form->add(TextField::name('manufacturer')->label('Manufacturer')->help('Which company (or person) built your bot?')->required(true)->value($bot->get('manufacturer')));
     $form->add(TextField::name('model')->label('Model')->help('What is the model or name of your bot design?')->required(true)->value($bot->get('model')));
     $form->add(TextField::name('electronics')->label('Electronics')->help('What electronics are you using to control your bot?')->value($bot->get('electronics')));
     $form->add(TextField::name('firmware')->label('Firmware')->help('What firmware are you running on your electronics?')->value($bot->get('firmware')));
     $form->add(TextField::name('extruder')->label('Extruder')->help('What extruder are you using to print with?')->value($bot->get('extruder')));
     return $form;
 }
開發者ID:eric116,項目名稱:BotQueue,代碼行數:21,代碼來源:bot_edit.php

示例3: _createLoginForm

 public function _createLoginForm()
 {
     $form = new Form("login");
     $form->action = "/login";
     if (!$this->args('username')) {
         $username = '';
     } else {
         $username = $this->args('username');
     }
     $form->add(HiddenField::name('action')->value('login')->required(true));
     $form->add(TextField::name('username')->label('Username')->value($username)->required(true));
     $form->add(PasswordField::name('password')->label('Password')->required(true));
     $form->add(CheckboxField::name('remember_me')->label("Remember me on this computer.")->checked(true));
     $form->setSubmitText("Sign into your account");
     $form->setSubmitClass("btn btn-primary btn-large");
     return $form;
 }
開發者ID:eric116,項目名稱:BotQueue,代碼行數:17,代碼來源:user.php

示例4: _createQueueForm

 /**
  * @param $queue Queue
  * @return Form
  */
 public function _createQueueForm($queue)
 {
     $form = new Form();
     $form->add(TextField::name('name')->label('Name')->help('What is the name of this queue?')->required(true)->value($queue->getName()));
     $form->add(NumericField::name('delay')->label('Delay')->help('What is the delay between starting prints in seconds?')->required(true)->min(0)->value($queue->get('delay')));
     return $form;
 }
開發者ID:eric116,項目名稱:BotQueue,代碼行數:11,代碼來源:queue.php

示例5: _editAccessTokenForm

 /**
  * @param $token OAuthToken
  * @return Form
  */
 public function _editAccessTokenForm($token)
 {
     $form = new Form();
     $form->action = $token->getUrl() . "/edit";
     $form->submitText = "Manage App Token";
     $form->add(TextField::name('name')->label('Name')->help("A nickname for this token such as the name the computer it's running on or the machine it's intended to control."));
     return $form;
 }
開發者ID:JoonasMelin,項目名稱:BotQueue,代碼行數:12,代碼來源:app.php

示例6: _createQueueForm

 /**
  * @param $queue Queue
  * @return Form
  */
 public function _createQueueForm($queue)
 {
     $form = new Form();
     $form->add(TextField::name('name')->label('Name')->help('What is the name of this queue?')->required(true)->value($queue->get('name')));
     return $form;
 }
開發者ID:JoonasMelin,項目名稱:BotQueue,代碼行數:10,代碼來源:queue.php

示例7: _createJobForm

 /**
  * @param $file StorageInterface
  * @param $queue_id int
  * @return Form
  */
 private function _createJobForm($file, $queue_id)
 {
     //load up our queues.
     $queues = User::$me->getQueues()->getAll();
     $qs = array();
     foreach ($queues as $row) {
         /* @var $q Queue */
         $q = $row['Queue'];
         $qs[$q->id] = $q->getName();
     }
     $form = new Form();
     $form->add(DisplayField::name('file_name')->label('File')->help('The file that will be printed.')->value($file->getLink()));
     $form->add(SelectField::name('queue_id')->label('Queue')->help('Which queue are you adding this job to?')->required(true)->options($qs)->value($queue_id));
     $form->add(TextField::name('quantity')->label('Quantity')->help('How many copies? Minimum 1, Maximum 100')->required(true)->value(1));
     $form->add(CheckboxField::name('priority')->label('Is this a priority job?')->help('Check this box to push this job to the top of the queue')->checked(false));
     return $form;
 }
開發者ID:eric116,項目名稱:BotQueue,代碼行數:22,代碼來源:job.php

示例8: _AppConsumerForm

 /**
  * @param $consumer OAuthConsumer
  * @return Form
  */
 private function _AppConsumerForm($consumer)
 {
     $form = new Form();
     $form->action = $consumer->getUrl() . "/edit";
     $form->submitText = "Save";
     $form->add(TextField::name('name')->label('Name')->value($consumer->getName())->required(true)->help("What do you call your app?"));
     $form->add(TextField::name('url')->label('App URL / Website')->value($consumer->get('app_url'))->help("Homepage with more information about your app."));
     return $form;
 }
開發者ID:eric116,項目名稱:BotQueue,代碼行數:13,代碼來源:app.php


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