Versions Compared

Key

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

...

Code Block
languagephp
titleSample Enroller Plugin
// Plugin/FooEnroller/Controller/FooEnrollerCoPetitionsController.php
 
App::uses('CoPetitionsController', 'Controller');

class FooEnrollerCoPetitionsController extends CoPetitionsController {
  // Class name, used by Cake
  public $name = "FooEnrollerCoPetitions";
  public $uses = array("CoPetition");
  
  /**
   * Plugin functionality following petitionerAttributes step
   *
   * @param Integer $id CO Petition ID
   * @param Array $onFinish URL, in Cake format
   */
  
  protected function execute_plugin_petitionerAttributes($id, $onFinish) {
    // Do some work here, then redirect when finished.
    // Pass the current step, $id, and the name of this plugin to generate the URL.

    $this->redirect($onFinish);
  }
}

...