Merge pull request #13959 from mlutfy/setMessageError
[civicrm-core.git] / CRM / Activity / Form / Task / SearchTaskHookSample.php
index 6d5abe7f77c9bb68787222f8391d4447d19364ee..488842609a718f8e183b1ab97e453bd086c1aa2a 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  */
 
 /**
@@ -42,7 +42,7 @@ class CRM_Activity_Form_Task_SearchTaskHookSample extends CRM_Activity_Form_Task
    */
   public function preProcess() {
     parent::preProcess();
-    $rows = array();
+    $rows = [];
     // display name and activity details of all selected contacts
     $activityIDs = implode(',', $this->_activityHolderIds);
 
@@ -63,12 +63,12 @@ INNER JOIN civicrm_contact ct ON ( ac.contact_id = ct.id )
     $dao = CRM_Core_DAO::executeQuery($query);
 
     while ($dao->fetch()) {
-      $rows[] = array(
+      $rows[] = [
         'subject' => $dao->subject,
         'activity_type' => $dao->activity_type,
         'activity_date' => $dao->activity_date,
         'display_name' => $dao->display_name,
-      );
+      ];
     }
     $this->assign('rows', $rows);
   }
@@ -77,13 +77,13 @@ INNER JOIN civicrm_contact ct ON ( ac.contact_id = ct.id )
    * Build the form object.
    */
   public function buildQuickForm() {
-    $this->addButtons(array(
-      array(
+    $this->addButtons([
+      [
         'type' => 'done',
         'name' => ts('Done'),
         'isDefault' => TRUE,
-      ),
-    ));
+      ],
+    ]);
   }
 
 }