Merge pull request #4115 from totten/4.5-dm-ign
[civicrm-core.git] / CRM / Mailing / Info.php
index a4aaf5eda32727536c60f5a143491319778a8f63..92aeb3bb243c90c4251bc1752c52d668a4bed44f 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -31,7 +31,7 @@
  * abstract class.
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -42,6 +42,9 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
 
 
   // docs inherited from interface
+  /**
+   * @return array
+   */
   public function getInfo() {
     return array(
       'name' => 'CiviMail',
@@ -52,6 +55,9 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
     );
   }
 
+  /**
+   * @return bool
+   */
   static function workflowEnabled() {
     $config = CRM_Core_Config::singleton();
 
@@ -78,6 +84,11 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
   }
 
   // docs inherited from interface
+  /**
+   * @param bool $getAllUnconditionally
+   *
+   * @return array
+   */
   public function getPermissions($getAllUnconditionally = FALSE) {
     $permissions = array(
       'access CiviMail',
@@ -97,23 +108,39 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
 
 
   // docs inherited from interface
+  /**
+   * @return null
+   */
   public function getUserDashboardElement() {
     // no dashboard element for this component
     return NULL;
   }
 
+  /**
+   * @return null
+   */
   public function getUserDashboardObject() {
     // no dashboard element for this component
     return NULL;
   }
 
   // docs inherited from interface
+  /**
+   * @return array
+   */
   public function registerTab() {
-    // this component doesn't use contact record tabs
-    return NULL;
+    return array(
+      'title' => ts('Mailings'),
+      'id' => 'mailing',
+      'url' => 'mailing',
+      'weight' => 45,
+    );
   }
 
   // docs inherited from interface
+  /**
+   * @return array
+   */
   public function registerAdvancedSearchPane() {
     return array('title' => ts('Mailings'),
       'weight' => 20,
@@ -121,11 +148,17 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
   }
 
   // docs inherited from interface
+  /**
+   * @return null
+   */
   public function getActivityTypes() {
     return NULL;
   }
 
   // add shortcut to Create New
+  /**
+   * @param $shortCuts
+   */
   public function creatNewShortcut(&$shortCuts) {}
 }