adding constructors to the registrationAccountSummary and registrationSummary classes
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 17 Jul 2017 20:16:31 +0000 (16:16 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 17 Jul 2017 20:16:31 +0000 (16:16 -0400)
accidentally left out the constructors for the classes

models/front/registrations/registrationAccountSummary.php
models/front/registrations/registrationSummary.php

index bfaef29..6b0e568 100644 (file)
     * @access public
     */
     public $config;
+    /**
+     * Constructor
+     *
+     * This contructor performs the work for this model. This model returns
+     * an array containing the following.
+     *
+     * 'status'
+     *
+     * True if successfull and false if there was a fatal failure.
+     *
+     * 'view'
+     *
+     * A suggested view name that the contoller should use instead of the
+     * default view for this model or false to indicate that the default view
+     * should be used.
+     *
+     * 'data'
+     *
+     * Data that the model is returning for use in merging with the view to
+     * produce output.
+     *
+     * @wpdb object WordPress database object
+     *
+     * @return array Array containing status, suggested view, and any data
+     */
+    public function __construct ($wpdb, $config)
+    {
+
+        // Save WordPress Database object
+        $this->wpdb = $wpdb;
+
+        // Save plugin configuration object
+        $this->config = $config;
+
+        // Run constructor for members data class
+        parent::__construct(false, false);
+
+    }
     
     public function modelAction($actionData = false)
     {
index 5b9a0dd..3027348 100644 (file)
     * @access public
     */
     public $config;
+    /**
+     * Constructor
+     *
+     * This contructor performs the work for this model. This model returns
+     * an array containing the following.
+     *
+     * 'status'
+     *
+     * True if successfull and false if there was a fatal failure.
+     *
+     * 'view'
+     *
+     * A suggested view name that the contoller should use instead of the
+     * default view for this model or false to indicate that the default view
+     * should be used.
+     *
+     * 'data'
+     *
+     * Data that the model is returning for use in merging with the view to
+     * produce output.
+     *
+     * @wpdb object WordPress database object
+     *
+     * @return array Array containing status, suggested view, and any data
+     */
     
     public function modelAction($actionData = false)
     {