Merge pull request #4981 from totten/master-cbf2
[civicrm-core.git] / CRM / Contact / Form / Location.php
index 9e94cb96129365be8d22682397ec70bdfe61d217..5126495b23d1392e9fde8cdca0494644b2245941 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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -41,7 +41,7 @@ class CRM_Contact_Form_Location {
    *
    * @return void
    */
-  static function preProcess(&$form) {
+  public static function preProcess(&$form) {
     $form->_addBlockName = CRM_Utils_Request::retrieve('block', 'String', CRM_Core_DAO::$_nullObject);
     $additionalblockCount = CRM_Utils_Request::retrieve('count', 'Positive', CRM_Core_DAO::$_nullObject);
 
@@ -55,8 +55,11 @@ class CRM_Contact_Form_Location {
 
     $className = CRM_Utils_System::getClassName($form);
     if (in_array($className, array(
-      'CRM_Event_Form_ManageEvent_Location', 'CRM_Contact_Form_Domain'))) {
-      $form->_blocks = array('Address' => ts('Address'),
+      'CRM_Event_Form_ManageEvent_Location',
+      'CRM_Contact_Form_Domain',
+    ))) {
+      $form->_blocks = array(
+        'Address' => ts('Address'),
         'Email' => ts('Email'),
         'Phone' => ts('Phone'),
       );
@@ -79,16 +82,15 @@ class CRM_Contact_Form_Location {
    * @param CRM_Core_Form $form
    *
    * @return void
-   * @access public
    */
-  static function buildQuickForm(&$form) {
+  public static function buildQuickForm(&$form) {
     // required for subsequent AJAX requests.
     $ajaxRequestBlocks = array();
     $generateAjaxRequest = 0;
 
     //build 1 instance of all blocks, without using ajax ...
     foreach ($form->_blocks as $blockName => $label) {
-      require_once (str_replace('_', DIRECTORY_SEPARATOR, 'CRM_Contact_Form_Edit_' . $blockName) . '.php');
+      require_once str_replace('_', DIRECTORY_SEPARATOR, 'CRM_Contact_Form_Edit_' . $blockName) . '.php';
       $name = strtolower($blockName);
 
       $instances = array(1);
@@ -112,7 +114,7 @@ class CRM_Contact_Form_Location {
 
         $form->set($blockName . '_Block_Count', $instance);
         $formName = 'CRM_Contact_Form_Edit_' . $blockName;
-        $formName::buildQuickForm( $form );
+        $formName::buildQuickForm($form);
       }
     }
 
@@ -120,5 +122,5 @@ class CRM_Contact_Form_Location {
     $form->assign('generateAjaxRequest', $generateAjaxRequest);
     $form->assign('ajaxRequestBlocks', $ajaxRequestBlocks);
   }
-}
 
+}