Merge pull request #5120 from eileenmcnaughton/CRM-15938
[civicrm-core.git] / CRM / Core / StateMachine.php
index f858b97880c59f4ad38616449d52ab42319316da..91c92a3ad83ad01029a24d234f265882365b5870 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
 class CRM_Core_StateMachine {
 
   /**
-   * The controller of this state machine
+   * The controller of this state machine.
    * @var object
    */
   protected $_controller;
 
   /**
-   * The list of states that belong to this state machine
+   * The list of states that belong to this state machine.
    * @var array
    */
   protected $_states;
@@ -64,26 +64,26 @@ class CRM_Core_StateMachine {
   protected $_pages;
 
   /**
-   * The names of the pages
+   * The names of the pages.
    *
    * @var array
    */
   protected $_pageNames;
 
   /**
-   * The mode that the state machine is operating in
+   * The mode that the state machine is operating in.
    * @var int
    */
   protected $_action = NULL;
 
   /**
-   * The display name for this machine
+   * The display name for this machine.
    * @var string
    */
   protected $_name = NULL;
 
   /**
-   * Class constructor
+   * Class constructor.
    *
    * @param object $controller
    *   The controller for this state machine.
@@ -100,7 +100,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Getter for name
+   * Getter for name.
    *
    * @return string
    */
@@ -109,7 +109,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Setter for name
+   * Setter for name.
    *
    * @param string $name
    *
@@ -120,7 +120,9 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Do a state transition jump. Currently only supported types are
+   * Do a state transition jump.
+   *
+   * Currently only supported types are
    * Next and Back. The other actions (Cancel, Done, Submit etc) do
    * not need the state machine to figure out where to go
    *
@@ -171,7 +173,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Helper function to add a State to the state machine
+   * Helper function to add a State to the state machine.
    *
    * @param string $name
    *   The internal name.
@@ -189,7 +191,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Given a name find the corresponding state
+   * Given a name find the corresponding state.
    *
    * @param string $name
    *   The state name.
@@ -207,7 +209,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Return the list of state objects
+   * Return the list of state objects.
    *
    * @return array
    *   array of states in the state machine
@@ -217,7 +219,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Return the state object corresponding to the name
+   * Return the state object corresponding to the name.
    *
    * @param string $name
    *   Name of page.
@@ -245,7 +247,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Return the list of form objects
+   * Return the list of form objects.
    *
    * @return array
    *   array of pages in the state machine
@@ -255,18 +257,12 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * AddSequentialStates: meta level function to create a simple
-   * wizard for a state machine that is completely sequential.
+   * Add sequential pages.
    *
+   * Meta level function to create a simple wizard for a state machine that is completely sequential.
    *
    * @param array $pages
    *   (reference ) the array of page objects.
-   *
-   * @internal param array $states states is an array of arrays. Each element
-   * of the top level array describes a state. Each state description
-   * includes the name, the display name and the class name
-   *
-   * @return void
    */
   public function addSequentialPages(&$pages) {
     $this->_pages = &$pages;
@@ -321,7 +317,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Reset the state machine
+   * Reset the state machine.
    *
    * @return void
    */
@@ -330,7 +326,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Getter for action
+   * Getter for action.
    *
    * @return int
    */
@@ -339,7 +335,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Setter for content
+   * Setter for content.
    *
    * @param string $content
    *   The content generated by this state machine.
@@ -351,7 +347,7 @@ class CRM_Core_StateMachine {
   }
 
   /**
-   * Getter for content
+   * Getter for content.
    *
    * @return string
    */