Merge pull request #14974 from civicrm/5.16
[civicrm-core.git] / CRM / Campaign / Page / SurveyType.php
index bf495f2cb452b2e0538649f47a7aea5eb1cf8c2a..bfe7e4cd906c59e7b4ba26c087c50768570fbd97 100644 (file)
@@ -43,7 +43,7 @@ class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic {
    *
    * @var array
    */
-  static $_links = NULL;
+  public static $_links = NULL;
 
   /**
    * The option group name.
@@ -79,9 +79,9 @@ class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic {
     $this->assign('gName', $this->_gName);
     $this->assign('GName', $this->_GName);
 
-    CRM_Utils_System::setTitle(ts('%1 Options', array(1 => $this->_GName)));
+    CRM_Utils_System::setTitle(ts('%1 Options', [1 => $this->_GName]));
 
-    $this->assign('addSurveyType', array("civicrm/admin/campaign/surveyType", "reset=1&action=add"));
+    $this->assign('addSurveyType', ["civicrm/admin/campaign/surveyType", "reset=1&action=add"]);
   }
 
   /**
@@ -102,30 +102,30 @@ class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic {
    */
   public function &links() {
     if (!(self::$_links)) {
-      self::$_links = array(
-        CRM_Core_Action::UPDATE => array(
+      self::$_links = [
+        CRM_Core_Action::UPDATE => [
           'name' => ts('Edit'),
           'url' => 'civicrm/admin/campaign/surveyType',
           'qs' => 'action=update&id=%%id%%&reset=1',
-          'title' => ts('Edit %1', array(1 => $this->_gName)),
-        ),
-        CRM_Core_Action::DISABLE => array(
+          'title' => ts('Edit %1', [1 => $this->_gName]),
+        ],
+        CRM_Core_Action::DISABLE => [
           'name' => ts('Disable'),
           'ref' => 'crm-enable-disable',
-          'title' => ts('Disable %1', array(1 => $this->_gName)),
-        ),
-        CRM_Core_Action::ENABLE => array(
+          'title' => ts('Disable %1', [1 => $this->_gName]),
+        ],
+        CRM_Core_Action::ENABLE => [
           'name' => ts('Enable'),
           'ref' => 'crm-enable-disable',
-          'title' => ts('Enable %1', array(1 => $this->_gName)),
-        ),
-        CRM_Core_Action::DELETE => array(
+          'title' => ts('Enable %1', [1 => $this->_gName]),
+        ],
+        CRM_Core_Action::DELETE => [
           'name' => ts('Delete'),
           'url' => 'civicrm/admin/campaign/surveyType',
           'qs' => 'action=delete&id=%%id%%',
-          'title' => ts('Delete %1 Type', array(1 => $this->_gName)),
-        ),
-      );
+          'title' => ts('Delete %1 Type', [1 => $this->_gName]),
+        ],
+      ];
     }
     return self::$_links;
   }
@@ -143,7 +143,7 @@ class CRM_Campaign_Page_SurveyType extends CRM_Core_Page_Basic {
    */
   public function browse() {
     $campaingCompId = CRM_Core_Component::getComponentID('CiviCampaign');
-    $groupParams = array('name' => $this->_gName);
+    $groupParams = ['name' => $this->_gName];
     $optionValues = CRM_Core_OptionValue::getRows($groupParams, $this->links(), 'component_id,weight');
 
     foreach ($optionValues as $key => $optionValue) {