phpcs - Fix error, "CONST keyword must be lowercase; expected const but found CONST"
[civicrm-core.git] / CRM / Campaign / Form / Campaign.php
index dcfc4088787587520a5124e127941d7b141d7faf..0fcca129221c1025e1e7632afc3eefe3c4458f4d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 class CRM_Campaign_Form_Campaign extends CRM_Core_Form {
 
   /**
-   * action
+   * Action
    *
    * @var int
    */
   protected $_action;
 
   /**
-   * context
+   * Context
    *
    * @var string
    */
   protected $_context;
 
   /**
-   * object values.
+   * Object values.
    *
    * @var array
    */
   protected $_values;
 
   /**
-   * the id of the campaign we are proceessing
+   * The id of the campaign we are proceessing
    *
    * @var int
    * @protected
@@ -131,12 +131,12 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form {
   }
 
   /**
-   * This function sets the default values for the form. Note that in edit/view mode
+   * Set default values for the form. Note that in edit/view mode
    * the default values are retrieved from the database
    *
    * @access public
    *
-   * @return void
+   * @return array
    */
   function setDefaultValues() {
     $defaults = $this->_values;
@@ -240,22 +240,20 @@ class CRM_Campaign_Form_Campaign extends CRM_Core_Form {
     // add campaign status
     $this->addSelect('status_id');
 
-    // add External Identifire Element
-    $this->add('text', 'external_identifier', ts('External Id'),
+    // add External Identifier Element
+    $this->add('text', 'external_identifier', ts('External ID'),
       CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Campaign', 'external_identifier'), FALSE
     );
 
     // add Campaign Parent Id
-    $campaigns = CRM_Campaign_BAO_Campaign::getCampaigns(CRM_Utils_Array::value('parent_id', $this->_values),
-      $this->_campaignId
-    );
+    $campaigns = CRM_Campaign_BAO_Campaign::getCampaigns(CRM_Utils_Array::value('parent_id', $this->_values), $this->_campaignId);
     if (!empty($campaigns)) {
-      $this->addElement('select', 'parent_id', ts('Parent Id'),
-        array(
-          '' => ts('- select Parent -')) + $campaigns
+      $this->addElement('select', 'parent_id', ts('Parent ID'),
+        array('' => ts('- select Parent -')) + $campaigns,
+        array('class' => 'crm-select2')
       );
     }
-$groups = CRM_Core_PseudoConstant::nestedGroup();
+    $groups = CRM_Core_PseudoConstant::nestedGroup();
     //get the campaign groups.
     $this->add('select', 'includeGroups',
       ts('Include Group(s)'),
@@ -304,7 +302,7 @@ $groups = CRM_Core_PseudoConstant::nestedGroup();
    * @param $files
    * @param $errors
    *
-   * @return void
+   * @return bool|array
    * @access public
    * @see valid_date
    */