Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

And then, we add 6 controllers file and 6 view files.

Path of 6 controllerfilescontroller files:

  • Apps\phpFox_BetterAds\Controller\Admin\AddController.php

  • Apps\phpFox_BetterAds\Controller\Admin\InvoiceController.php

  • Apps\phpFox_BetterAds\Controller\Admin\PlacementController.php

  • Apps\phpFox_BetterAds\Controller\Admin\SponsorController.php

  • Apps\phpFox_BetterAds\Controller\Admin\AddPlacementController.php

  • Apps\phpFox_BetterAds\Controller\Admin\IndexController.php

Path of 6 view files

  • PF.Site/Apps/phpFox_BetterAds/views/controller/admincp/add.html.php
  • PF.Site/Apps/phpFox_BetterAds/views/controller/admincp/addplacement.html.php
  • PF.Site/Apps/phpFox_BetterAds/views/controller/admincp/index.html.php
  • PF.Site/Apps/phpFox_BetterAds/views/controller/admincp/invoice.html.php
  • PF.Site/Apps/phpFox_BetterAds/views/controller/admincp/placement.html.php
  • PF.Site/Apps/phpFox_BetterAds/views/controller/admincp/sponsor.html.php

Sample structure of a controller file

Code Block
languagephp
titleAddController.php
linenumberstrue
<?php
namespace Apps\phpFox_BetterAds\Controller\Admin;

use Phpfox;
use Admincp_Component_Controller_App_Index;
use Phpfox_Plugin;

defined('PHPFOX') or exit('NO DICE!');

/**
 * Class AddController
 * @author Neil <neil@phpfox.com>
 * @package Apps\phpFox_BetterAds\Controller\Admin
 */
class AddController extends Admincp_Component_Controller_App_Index
{
    public function process()
    {
        parent::process();

        //Put your code here
    }

    public function clean()
    {
        (($sPlugin = Phpfox_Plugin::get('betterads.component_controller_admincp_add_clean')) ? eval($sPlugin) : false);
    }
}