Commit | Line | Data |
---|---|---|
2ede60ec DL |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
2ede60ec | 5 | | | |
bc77d7c0 TO |
6 | | This work is published under the GNU AGPLv3 license with some | |
7 | | permitted exceptions and without any warranty. For full license | | |
8 | | and copyright information, see https://civicrm.org/licensing | | |
2ede60ec | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
2ede60ec DL |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
2ede60ec DL |
16 | */ |
17 | ||
18 | /** | |
19 | * This class handle mailing and contact related functions | |
2ede60ec DL |
20 | */ |
21 | class CRM_Mailing_Page_Tab extends CRM_Contact_Page_View { | |
22 | /** | |
fe482240 | 23 | * The action links that we need to display for the browse screen. |
2ede60ec DL |
24 | * |
25 | * @var array | |
2ede60ec | 26 | */ |
7e8c8317 | 27 | public static $_links = NULL; |
2ede60ec DL |
28 | public $_permission = NULL; |
29 | public $_contactId = NULL; | |
30 | ||
31 | /** | |
46116924 | 32 | * Called when action is browse. |
2ede60ec | 33 | */ |
00be9182 | 34 | public function browse() { |
2ede60ec DL |
35 | } |
36 | ||
37 | /** | |
46116924 | 38 | * Build all the data structures needed to build the form. |
2ede60ec | 39 | */ |
00be9182 | 40 | public function preProcess() { |
2ede60ec | 41 | $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); |
353ffa53 | 42 | $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this); |
2ede60ec DL |
43 | |
44 | $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE); | |
45 | $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId); | |
46 | ||
47 | $this->assign('contactId', $this->_contactId); | |
48 | $this->assign('displayName', $displayName); | |
49 | ||
46116924 | 50 | // Check logged in url permission. |
2ede60ec DL |
51 | CRM_Contact_Page_View::checkUserPermission($this); |
52 | ||
be2fb01f | 53 | CRM_Utils_System::setTitle(ts('Mailings sent to %1', [1 => $displayName])); |
2ede60ec DL |
54 | } |
55 | ||
56 | /** | |
46116924 | 57 | * The main function that is called when the page loads. |
2ede60ec | 58 | * |
46116924 | 59 | * It decides the which action has to be taken for the page. |
2ede60ec | 60 | */ |
00be9182 | 61 | public function run() { |
2ede60ec DL |
62 | $this->preProcess(); |
63 | $this->browse(); | |
46116924 | 64 | parent::run(); |
2ede60ec | 65 | } |
96025800 | 66 | |
2ede60ec | 67 | } |