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


PHP F0FController类代码示例

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


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


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