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


PHP FormUI::save方法代码示例

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


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

示例1: updated_config

 public function updated_config(FormUI $ui)
 {
     Session::notice(_t('Settings saved.', 's3siloplugin'));
     $ui->save();
     if (is_null(Options::get('s3_bucket'))) {
         Session::notice(_t('Please select a bucket from your S3 account.', 's3siloplugin'));
     }
     Utils::redirect();
 }
开发者ID:ringmaster,项目名称:s3silo,代码行数:9,代码来源:s3silo.plugin.php

示例2: updated_config

 public function updated_config(FormUI $ui)
 {
     $blacklist = explode("\n", $ui->blacklist->value);
     $blacklist = array_unique($blacklist);
     natsort($blacklist);
     $_POST[$ui->blacklist->field] = implode("\n", $blacklist);
     Session::notice(_t('Blacklist saved.', 'simpleblacklist'));
     $ui->save();
 }
开发者ID:habari-extras,项目名称:simpleblacklist,代码行数:9,代码来源:simpleblacklist.plugin.php

示例3: formui_submit

 public function formui_submit(FormUI $form)
 {
     $filename = basename($form->pluginurl);
     //local file path (e.g. habari_installation/system/plugins/plugin.zip)
     $filePath = $this->downloadplugin_pluginsPath . $filename;
     // check if the remote file is successfully opened
     if ($fp = fopen($form->pluginurl, 'r')) {
         $content = '';
         // keep reading until there's nothing left
         while ($line = fread($fp, 1024)) {
             $content .= $line;
         }
         $fp = fopen($filePath, 'w');
         fwrite($fp, $content);
         fclose($fp);
     } else {
         Session::notice(_t("Error during file download", 'plugin_locale'));
         break;
     }
     $zip = new ZipArchive();
     $res = $zip->open($filePath);
     if ($res === TRUE) {
         $zip->extractTo($this->downloadplugin_pluginsPath);
         $zip->close();
         //SET 775 Permission ?
         Session::notice(_t('Plugin installed', 'plugin_locale'));
     } else {
         Session::notice(_t('Error during plugin installation', 'plugin_locale'));
         $form->save();
         unlink($filePath);
         break;
     }
     unlink($filePath);
     $form->pluginurl->value = '';
     $form->save();
     Utils::redirect(URL::get('admin', 'page=plugins'));
 }
开发者ID:habari-extras,项目名称:download-plugin,代码行数:37,代码来源:download-plugin.plugin.php

示例4: updated_config

 /**
  * Give the user a session message to confirm options were saved.
  **/
 public function updated_config(FormUI $ui)
 {
     Session::notice(_t('Twitter options saved.', 'twitter'));
     $ui->save();
 }
开发者ID:anupom,项目名称:my-blog,代码行数:8,代码来源:twitter.plugin.php

示例5: form_options_success

 /**
  * Display a message when the site options are saved, and save those options
  *
  * @param FormUI $form The successfully submitted form
  */
 public function form_options_success($form)
 {
     Session::notice(_t('Successfully updated options'));
     $form->save();
     Utils::redirect();
 }
开发者ID:psaintlaurent,项目名称:Habari,代码行数:11,代码来源:adminhandler.php

示例6: updated_config

 public function updated_config(FormUI $ui)
 {
     Session::notice(_t('Bit.ly options saved.', 'bitly'));
     $ui->save();
 }
开发者ID:habari-extras,项目名称:bitly,代码行数:5,代码来源:bitly.plugin.php

示例7: formui_submit

 public function formui_submit(FormUI $form)
 {
     Session::notice(_t('Mollom API Keys saved.', 'mollom'));
     $form->save();
 }
开发者ID:habari-extras,项目名称:mollom,代码行数:5,代码来源:mollom.plugin.php

示例8: save_block

 /**
  * Display a standard success message upon saving the form
  *
  * @param FormUI $form The form that will be saved
  * @return bool Returning false tells the form that the save was handled
  */
 public function save_block(FormUI $form)
 {
     $form->save();
     return false;
 }
开发者ID:habari,项目名称:system,代码行数:11,代码来源:block.php

示例9: formui_submit

 public function formui_submit(FormUI $form)
 {
     Session::notice(_t('Blogroll options saved.', self::DOMAIN));
     $form->save();
 }
开发者ID:habari-extras,项目名称:blogroll,代码行数:5,代码来源:blogroll.plugin.php

示例10: save_config

 /**
  * Invoked when the before the plugin configurations are saved
  *
  * @param FormUI $form The configuration form being saved
  * @return true
  */
 public function save_config($form)
 {
     $form->save();
     Session::notice('Woopra plugin configuration saved!');
     return false;
 }
开发者ID:habari-extras,项目名称:woopra,代码行数:12,代码来源:woopra.plugin.php

示例11: updated_config

 /**
  * Perform actions when the admin plugin form is successfully submitted. 
  * 
  * @param FormUI $ui The form that successfully completed
  * @return boolean True if the normal processing should occur to save plugin options from the form to the database
  */
 public function updated_config($ui)
 {
     $ui->save();
     // Delete the cached feed data
     DB::query('TRUNCATE {feedlist}');
     // Reset the cronjob so that it runs immediately with the change
     CronTab::delete_cronjob('feedlist');
     CronTab::add_hourly_cron('feedlist', 'load_feeds', 'Load feeds for feedlist plugin.');
     return false;
 }
开发者ID:habari-extras,项目名称:feedlist,代码行数:16,代码来源:feedlist.plugin.php

示例12: save_config

 /**
  * Handle the form submition and save options
  * @param FormUI $form The FormUI that was submitted
  */
 public function save_config(FormUI $form)
 {
     Session::notice(_t('Piwik plugin configuration saved', 'piwik'));
     $form->save();
 }
开发者ID:habari-extras,项目名称:piwik,代码行数:9,代码来源:piwik.plugin.php

示例13: chosen_engine

 /**
  * Callback function from choosing the engine. 
  *
  * @param FormUI $ui 
  * @return string|bool
  */
 public function chosen_engine($ui)
 {
     $this->load_backend($ui->engine->value);
     if (!$this->_backend->check_conditions()) {
         $ui->set_option('success_message', _t('The engine could not be set up, please check the requirements.'));
     } else {
         $ui->save();
         return '<p>' . _t('Engine saved - please press close and then select Configure in order to check the details and activate the engine.') . '</p>';
     }
     return false;
 }
开发者ID:habari-extras,项目名称:multisearch,代码行数:17,代码来源:multisearch.plugin.php


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