• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP F0FController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: save

 public function save()
 {
     $task = $this->getTask();
     // get the Application Object
     $app = JFactory::getApplication();
     // get the payment id
     $payment_id = $app->input->getInt('extension_id');
     // if payment id exists
     if ($payment_id) {
         $data = $app->input->getArray($_POST);
         $paymentdata = array();
         $paymentdata['extension_id'] = $payment_id;
         $registry = new JRegistry();
         $registry->loadArray($data);
         $paymentdata['params'] = $registry->toString('JSON');
         try {
             F0FTable::getAnInstance('Payment', 'J2StoreTable')->save($paymentdata);
         } catch (Exception $e) {
             $msg = $e->getMessage();
         }
         switch ($task) {
             case 'apply':
                 parent::apply();
                 break;
             case 'save':
                 parent::save();
                 break;
             case 'savenew':
                 parent::savenew();
                 break;
         }
     }
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:33,代码来源:payments.php


示例2: execute

 public function execute($task)
 {
     if (in_array($task, array('add', 'edit', 'read'))) {
         $task = 'browse';
     }
     parent::execute($task);
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:7,代码来源:myprofile.php


示例3: execute

 public function execute($task)
 {
     if (!in_array($task, array('offline', 'online'))) {
         $task = 'browse';
     }
     parent::execute($task);
 }
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:7,代码来源:eom.php


示例4: onBeforeBrowse

 protected function onBeforeBrowse()
 {
     $db = JFactory::getDbo();
     $config = J2Store::config();
     $installation_complete = $config->get('installation_complete', 0);
     if (!$installation_complete) {
         //installation not completed
         JFactory::getApplication()->redirect('index.php?option=com_j2store&view=postconfig');
     }
     //first check if the currency table has a default records at least.
     $rows = F0FModel::getTmpInstance('Currencies', 'J2StoreModel')->enabled(1)->getList();
     if (count($rows) < 1) {
         //no records found. Dumb default data
         F0FModel::getTmpInstance('Currencies', 'J2StoreModel')->create_currency_by_code('USD', 'USD');
     }
     //update schema
     $dbInstaller = new F0FDatabaseInstaller(array('dbinstaller_directory' => JPATH_ADMINISTRATOR . '/components/com_j2store/sql/xml'));
     $dbInstaller->updateSchema();
     //update cart table
     $cols = $db->getTableColumns('#__j2store_carts');
     $cols_to_delete = array('product_id', 'vendor_id', 'variant_id', 'product_type', 'product_options', 'product_qty');
     foreach ($cols_to_delete as $key) {
         if (array_key_exists($key, $cols)) {
             $db->setQuery('ALTER TABLE #__j2store_carts DROP COLUMN ' . $key);
             try {
                 $db->execute();
             } catch (Exception $e) {
                 echo $e->getMessage();
             }
         }
     }
     return parent::onBeforeBrowse();
 }
开发者ID:jputz12,项目名称:OneNow-Vshop,代码行数:33,代码来源:cpanels.php


示例5: execute

 public function execute($task)
 {
     if ($task != 'step') {
         $task = 'browse';
     }
     parent::execute($task);
 }
开发者ID:s23zenden,项目名称:asestech,代码行数:7,代码来源:backup.php


示例6: onBeforeBrowse

 public function onBeforeBrowse()
 {
     $result = parent::onBeforeBrowse();
     if ($result) {
         $params = JComponentHelper::getParams('com_akeeba');
         $model = $this->getThisModel();
         $view = $this->getThisView();
         /** @var AkeebaModelCpanels $model */
         $view->setModel($model);
         $aeconfig = Factory::getConfiguration();
         // Invalidate stale backups
         Factory::resetState(array('global' => true, 'log' => false, 'maxrun' => $params->get('failure_timeout', 180)));
         // Just in case the reset() loaded a stale configuration...
         Platform::getInstance()->load_configuration();
         // Let's make sure the temporary and output directories are set correctly and writable...
         $wizmodel = F0FModel::getAnInstance('Confwiz', 'AkeebaModel');
         $wizmodel->autofixDirectories();
         // Check if we need to toggle the settings encryption feature
         $model->checkSettingsEncryption();
         // Update the magic component parameters
         $model->updateMagicParameters();
         // Run the automatic database check
         $model->checkAndFixDatabase();
         // Run the automatic update site refresh
         /** @var AkeebaModelUpdates $updateModel */
         $updateModel = F0FModel::getTmpInstance('Updates', 'AkeebaModel');
         $updateModel->refreshUpdateSite();
     }
     return $result;
 }
开发者ID:kidaa30,项目名称:lojinha,代码行数:30,代码来源:cpanel.php


示例7: execute

 public function execute($task)
 {
     if (!in_array($task, array('save', 'cancel', 'downloaddat'))) {
         $task = 'browse';
     }
     parent::execute($task);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:7,代码来源:geoblock.php


示例8: execute

 public function execute($task)
 {
     if (!in_array($task, array('purgesessions'))) {
         $task = 'browse';
     }
     parent::execute($task);
 }
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:7,代码来源:dbtools.php


示例9: execute

 public function execute($task)
 {
     if (!in_array($task, array('read', 'cancel'))) {
         $task = 'read';
         $this->input->set('task', 'read');
     }
     parent::execute($task);
 }
开发者ID:jonatasmm,项目名称:akeebasubs,代码行数:8,代码来源:callbacks.php


示例10: execute

 public function execute($task)
 {
     if (!in_array($task, array('savedefaults', 'saveperms', 'saveapplyperms'))) {
         $task = 'browse';
     }
     $this->getThisModel()->setState('task', $task);
     parent::execute($task);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:8,代码来源:fixpermsconfig.php


示例11: execute

 /**
  * Executes a given controller task. The onBefore<task> and onAfter<task>
  * methods are called automatically if they exist.
  *
  * @param   string $task The task to execute, e.g. "browse"
  *
  * @throws  Exception   Exception thrown if the onBefore<task> returns false
  *
  * @return  null|bool  False on execution failure
  */
 public function execute($task)
 {
     $validTasks = array('force', 'overview', 'startupdate', 'download', 'extract', 'install', 'cleanup');
     if (!in_array($task, $validTasks)) {
         $task = 'overview';
     }
     return parent::execute($task);
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:18,代码来源:update.php


示例12: copy

 public function copy()
 {
     $result = parent::copy();
     if ($result) {
         JFactory::getApplication()->enqueueMessage(JText::_('COM_AKEEBASUBS_EMAILTEMPLATE_COPIED'), 'message');
     }
     return $result;
 }
开发者ID:jonatasmm,项目名称:akeebasubs,代码行数:8,代码来源:emailtemplates.php


示例13: __construct

 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('getexpirations', 'browse');
     $this->registerTask('renewals', 'browse');
     $this->registerTask('vies', 'invoices');
     $this->registerTask('vatmoss', 'invoices');
     $this->cacheableTasks = array();
 }
开发者ID:ZoiaoDePeixe,项目名称:akeebasubs,代码行数:9,代码来源:reports.php


示例14: stepscan

 public function stepscan()
 {
     if (!$this->checkACL('admintools.security')) {
         JError::raiseError('403', JText::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'));
     }
     $this->input->set('layout', 'scan');
     $this->getThisView()->retarray = $this->getThisModel()->stepScan();
     $this->getThisView()->setLayout('scan');
     $this->layout = 'scan';
     parent::display(false);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:11,代码来源:scan.php


示例15: execute

 public function execute($task)
 {
     // Only task browse and save are valid
     $allowedTasks = array('browse', 'save');
     // Take browse as the default task
     if (!in_array($task, $allowedTasks)) {
         $task = 'browse';
     }
     $this->input->set('task', $task, $this->input);
     parent::execute($task);
 }
开发者ID:jonatasmm,项目名称:akeebasubs,代码行数:11,代码来源:userinfos.php


示例16: execute

 public function execute($task)
 {
     $allowedTasks = array('browse', 'read', 'save');
     if (in_array($task, array('edit', 'add'))) {
         $task = 'read';
     }
     if (!in_array($task, $allowedTasks)) {
         return false;
     }
     $this->input->set('task', $task);
     return parent::execute($task);
 }
开发者ID:jonatasmm,项目名称:akeebasubs,代码行数:12,代码来源:subscriptions.php


示例17: onBeforeBrowse

 protected function onBeforeBrowse()
 {
     $result = parent::onBeforeBrowse();
     if ($result) {
         F0FModel::getTmpInstance('Cpanels', 'AkeebasubsModel')->checkAndFixDatabase()->saveMagicVariables();
         // Run the automatic update site refresh
         /** @var AkeebasubsModelUpdates $updateModel */
         $updateModel = F0FModel::getTmpInstance('Updates', 'AkeebasubsModel');
         $updateModel->refreshUpdateSite();
     }
     return $result;
 }
开发者ID:jonatasmm,项目名称:akeebasubs,代码行数:12,代码来源:cpanels.php


示例18: onBeforeBrowse

 public function onBeforeBrowse()
 {
     $result = parent::onBeforeBrowse();
     if ($result) {
         $params = JComponentHelper::getParams('com_akeeba');
         $model = $this->getThisModel();
         $view = $this->getThisView();
         /** @var AkeebaModelCpanels $model */
         $view->setModel($model);
         $aeconfig = AEFactory::getConfiguration();
         // Invalidate stale backups
         AECoreKettenrad::reset(array('global' => true, 'log' => false, 'maxrun' => $params->get('failure_timeout', 180)));
         // Just in case the reset() loaded a stale configuration...
         AEPlatform::getInstance()->load_configuration();
         // Let's make sure the temporary and output directories are set correctly and writable...
         $wizmodel = F0FModel::getAnInstance('Confwiz', 'AkeebaModel');
         $wizmodel->autofixDirectories();
         // Check if we need to toggle the settings encryption feature
         $model->checkSettingsEncryption();
         // Update the magic component parameters
         $model->updateMagicParameters();
         // Run the automatic database check
         $model->checkAndFixDatabase();
         // Run the automatic update site refresh
         /** @var AkeebaModelUpdates $updateModel */
         $updateModel = F0FModel::getTmpInstance('Updates', 'AkeebaModel');
         $updateModel->refreshUpdateSite();
         // Check the last installed version and show the post-setup page on Joomla! 3.1 or earlier
         if (!version_compare(JVERSION, '3.2.0', 'ge')) {
             $versionLast = null;
             if (file_exists(JPATH_COMPONENT_ADMINISTRATOR . '/akeeba.lastversion.php')) {
                 include_once JPATH_COMPONENT_ADMINISTRATOR . '/akeeba.lastversion.php';
                 if (defined('AKEEBA_LASTVERSIONCHECK')) {
                     $versionLast = AKEEBA_LASTVERSIONCHECK;
                 }
             }
             if (is_null($versionLast)) {
                 $component = JComponentHelper::getComponent('com_akeeba');
                 if (is_object($component->params) && $component->params instanceof JRegistry) {
                     $params = $component->params;
                 } else {
                     $params = new JParameter($component->params);
                 }
                 $versionLast = $params->get('lastversion', '');
             }
             if (version_compare(AKEEBA_VERSION, $versionLast, 'ne') || empty($versionLast)) {
                 $this->setRedirect('index.php?option=com_akeeba&view=postsetup');
                 return true;
             }
         }
     }
     return $result;
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:53,代码来源:cpanel.php


示例19: browse

 public function browse()
 {
     if (parent::browse()) {
         $config = J2Store::config();
         $complete = $config->get('installation_complete', 0);
         if ($complete) {
             JFactory::getApplication()->redirect('index.php?option=com_j2store&view=cpanel', JText::_('J2STORE_POSTCONFIG_STORE_SETUP_DONE_ALREADY'));
         }
         return true;
     }
     return false;
 }
开发者ID:davetheapple,项目名称:oakencraft,代码行数:12,代码来源:postconfig.php


示例20: onBeforeBrowse

 public function onBeforeBrowse()
 {
     $result = parent::onBeforeBrowse();
     if ($result) {
         $view = $this->getThisView();
         $view->setModel($this->getThisModel(), true);
         // Upgrade the database schema if necessary
         $this->getThisModel()->checkAndFixDatabase();
         // Migrate user data if necessary
         $this->getThisModel()->autoMigrate();
         // Refresh the update site definitions if required. Also takes into account any change of the Download ID
         // in the Options.
         /** @var AdmintoolsModelUpdates $updateModel */
         $updateModel = F0FModel::getTmpInstance('Updates', 'AdmintoolsModel');
         $updateModel->refreshUpdateSite();
         // Is a Download ID needed but missing?
         $needDLID = $this->getThisModel()->needsDownloadID();
         $view->needsdlid = $needDLID;
         // Check the last installed version and show the post-setup page on Joomla! 3.1 or earlier
         if (!version_compare(JVERSION, '3.2.0', 'ge')) {
             $versionLast = null;
             if (file_exists(JPATH_COMPONENT_ADMINISTRATOR . '/admintools.lastversion.php')) {
                 include_once JPATH_COMPONENT_ADMINISTRATOR . '/admintools.lastversion.php';
                 if (defined('ADMINTOOLS_LASTVERSIONCHECK')) {
                     $versionLast = ADMINTOOLS_LASTVERSIONCHECK;
                 }
             }
             if (is_null($versionLast)) {
                 // FIX 2.1.13: Load the component parameters WITHOUT using JComponentHelper
                 $db = JFactory::getDbo();
                 $query = $db->getQuery(true);
                 $query->select(array($db->quoteName('params')))->from($db->quoteName('#__extensions'))->where($db->quoteName('type') . ' = ' . $db->Quote('component'))->where($db->quoteName('element') . ' = ' . $db->Quote('com_admintools'));
                 $db->setQuery($query);
                 $rawparams = $db->loadResult();
                 $params = new JRegistry();
                 if (version_compare(JVERSION, '3.0', 'ge')) {
                     $params->loadString($rawparams, 'JSON');
                 } else {
                     $params->loadJSON($rawparams);
                 }
                 $versionLast = $params->get('lastversion', '');
             }
             if (version_compare(ADMINTOOLS_VERSION, $versionLast, 'ne') || empty($versionLast)) {
                 $this->setRedirect('index.php?option=com_admintools&view=postsetup');
                 return true;
             }
         }
     }
     return $result;
 }
开发者ID:neoandrew1000,项目名称:crao_journal,代码行数:50,代码来源:cpanel.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP F0FInflector类代码示例发布时间:2022-05-23
下一篇:
PHP F类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap