Merge remote-tracking branch 'upstream/4.6' into 4.6-master-2015-10-14-11-04-09
[civicrm-core.git] / CRM / Financial / Page / FinancialTypeAccount.php
index d7f9b29bde6a9f383dc59154164ae8d82a0b1dee..caebcf5760c87e83fe15c0dbe9e2fd1bd659dc91 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
  */
 class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
   /**
-   * 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
-   * @static
    */
   static $_links = NULL;
 
   /**
-   * The account id that we need to display for the browse screen
+   * The account id that we need to display for the browse screen.
    *
    * @var array
-   * @static
    */
   protected $_aid = NULL;
 
   /**
-   * Get BAO Name
+   * Get BAO Name.
    *
-   * @return string Classname of BAO.
+   * @return string
+   *   Classname of BAO.
    */
   public function getBAOName() {
     return 'CRM_Financial_BAO_FinancialTypeAccount';
   }
 
   /**
-   * Get action Links
+   * Get action Links.
    *
-   * @return array (reference) of action links
+   * @return array
+   *   (reference) of action links
    */
   public function &links() {
     if (!(self::$_links)) {
       self::$_links = array(
-        CRM_Core_Action::UPDATE  => array(
+        CRM_Core_Action::UPDATE => array(
           'name' => ts('Edit'),
           'url' => 'civicrm/admin/financial/financialType/accounts',
           'qs' => 'action=update&id=%%id%%&aid=%%aid%%&reset=1',
           'title' => ts('Edit Financial Type Account'),
         ),
-        CRM_Core_Action::DELETE  => array(
+        CRM_Core_Action::DELETE => array(
           'name' => ts('Delete'),
           'url' => 'civicrm/admin/financial/financialType/accounts',
           'qs' => 'action=delete&id=%%id%%&aid=%%aid%%',
@@ -95,7 +95,6 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
    * Finally it calls the parent's run method.
    *
    * @return void
-   *
    */
   public function run() {
     // get the requested action
@@ -119,10 +118,9 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
   }
 
   /**
-   * Browse all Financial Type Account data
+   * Browse all Financial Type Account data.
    *
    * @return void
-   * @static
    */
   public function browse() {
     // get all Financial Type Account data sorted by weight
@@ -134,7 +132,7 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
     if ($this->_aid) {
       $relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Accounts Receivable Account is' "));
       $this->_title = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $this->_aid, 'name');
-      CRM_Utils_System::setTitle($this->_title  . ' - ' . ts('Assigned Financial Accounts'));
+      CRM_Utils_System::setTitle($this->_title . ' - ' . ts('Assigned Financial Accounts'));
       $financialAccountType = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialAccount', 'financial_account_type_id');
       $accountRelationship = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_EntityFinancialAccount', 'account_relationship');
       $dao->copyValues($params);
@@ -219,4 +217,5 @@ class CRM_Financial_Page_FinancialTypeAccount extends CRM_Core_Page {
     $controller->process();
     $controller->run();
   }
+
 }