Merge pull request #5049 from totten/master-mailing-multiling
[civicrm-core.git] / CRM / Price / Page / Option.php
index a4da057bf99108880797a104b703f7dcc5d15b92..2630b75baea54279fa7d418351354a07b9acc996 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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -46,28 +46,28 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
   public $useLivePageJS = TRUE;
 
   /**
-   * The field id of the option
+   * The field id of the option.
    *
    * @var int
    */
   protected $_fid;
 
   /**
-   * The field id of the option
+   * The field id of the option.
    *
    * @var int
    */
   protected $_sid;
 
   /**
-   * The price set is reserved or not
+   * The price set is reserved or not.
    *
    * @var boolean
    */
   protected $_isSetReserved = FALSE;
 
   /**
-   * The action links that we need to display for the browse screen
+   * The action links that we need to display for the browse screen.
    *
    * @var array
    */
@@ -76,11 +76,10 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
   /**
    * Get the action links for this page.
    *
-   * @param null
-   *
-   * @return array  array of action links that we need to display for the browse screen
+   * @return array
+   *   array of action links that we need to display for the browse screen
    */
-  function &actionLinks() {
+  public function &actionLinks() {
     if (!isset(self::$_actionLinks)) {
       self::$_actionLinks = array(
         CRM_Core_Action::UPDATE => array(
@@ -119,8 +118,6 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
   /**
    * Browse all price fields.
    *
-   * @param null
-   *
    * @return void
    */
   public function browse() {
@@ -218,8 +215,8 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
     $session = CRM_Core_Session::singleton();
 
     $session->pushUserContext(CRM_Utils_System::url('civicrm/admin/price/field/option',
-        "reset=1&action=browse&fid={$this->_fid}&sid={$this->_sid}"
-      ));
+      "reset=1&action=browse&fid={$this->_fid}&sid={$this->_sid}"
+    ));
     $controller = new CRM_Core_Controller_Simple('CRM_Price_Form_Option', ts('Price Field Option'), $action);
     $controller->set('fid', $this->_fid);
     $controller->setEmbedded(TRUE);
@@ -254,12 +251,9 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
    * This method is called after the page is created. It checks for the
    * type of action and executes that action.
    *
-   * @param null
-   *
    * @return void
    */
   public function run() {
-
     // get the field id
     $this->_fid = CRM_Utils_Request::retrieve('fid', 'Positive',
       $this, FALSE, 0
@@ -275,10 +269,12 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
       $this->assign('isReserved', $this->_isSetReserved);
     }
     //as url contain $sid so append breadcrumb dynamically.
-    $breadcrumb = array(array(
-    'title' => ts('Price Fields'),
+    $breadcrumb = array(
+      array(
+        'title' => ts('Price Fields'),
         'url' => CRM_Utils_System::url('civicrm/admin/price/field', 'reset=1&sid=' . $this->_sid),
-      ));
+      ),
+    );
     CRM_Utils_System::appendBreadCrumb($breadcrumb);
 
     if ($this->_fid) {
@@ -310,7 +306,8 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
     // what action to take ?
     if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD |
         CRM_Core_Action::VIEW | CRM_Core_Action::DELETE
-      ) && !$this->_isSetReserved) {
+      ) && !$this->_isSetReserved
+    ) {
       // no browse for edit/update/view
       $this->edit($action);
     }
@@ -320,4 +317,5 @@ class CRM_Price_Page_Option extends CRM_Core_Page {
     // Call the parents run method
     return parent::run();
   }
+
 }