Merge pull request #4979 from xurizaemon/codingstandards-12
[civicrm-core.git] / CRM / Admin / Form / Preferences / Display.php
index fe201d97feafc23e05fea556d8b0ba59719a2c8d..3ba0ddffd4d9e52d4e13d8eed3dccfab9cd0a2f4 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  *
  */
 
-/**r
- * This class generates form components for the display preferences
- *
+/**
+ * This class generates form components for the display preferences.
  */
 class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
-  function preProcess() {
+  public function preProcess() {
     CRM_Utils_System::setTitle(ts('Settings - Display Preferences'));
 
     $this->_varNames = array(
-      CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME =>
-      array(
+      CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME => array(
         'contact_view_options' => array(
           'html_type' => 'checkboxes',
           'title' => ts('Viewing Contacts'),
@@ -112,7 +110,7 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
   /**
    * @return array
    */
-  function setDefaultValues() {
+  public function setDefaultValues() {
     $defaults = parent::setDefaultValues();
     parent::cbsDefaultValues($defaults);
 
@@ -120,8 +118,7 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
       $defaults['editor_id'] = $this->_config->editor_id;
     }
     if (empty($this->_config->display_name_format)) {
-      $defaults['display_name_format'] =
-        "{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}";
+      $defaults['display_name_format'] = "{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}";
     }
     else {
       $defaults['display_name_format'] = $this->_config->display_name_format;
@@ -143,10 +140,9 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
   }
 
   /**
-   * Function to build the form
+   * Build the form object
    *
    * @return void
-   * @access public
    */
   public function buildQuickForm() {
     $wysiwyg_options = array('' => ts('Textarea')) + CRM_Core_OptionGroup::values('wysiwyg_editor');
@@ -176,8 +172,8 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
         cj("#crm-preferences-display-form-block-wysiwyg_input_format").hide()
       }';
 
-      $formats           = filter_formats();
-      $format_options    = array();
+      $formats = filter_formats();
+      $format_options = array();
       foreach ($formats as $id => $format) {
         $format_options[$id] = $format->name;
       }
@@ -207,9 +203,8 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
   }
 
   /**
-   * Function to process the form
+   * Process the form submission
    *
-   * @access public
    *
    * @return void
    */
@@ -244,6 +239,4 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences {
 
     $this->postProcessCommon();
   }
-  //end of function
 }
-