3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 class CRM_Contact_Page_View_Tag
extends CRM_Core_Page
{
20 * Called when action is browse.
22 public function browse() {
23 $controller = new CRM_Core_Controller_Simple('CRM_Tag_Form_Tag', ts('Contact Tags'), $this->_action
);
24 $controller->setEmbedded(TRUE);
26 // set the userContext stack
27 $session = CRM_Core_Session
::singleton();
29 $session->pushUserContext(CRM_Utils_System
::url('civicrm/contact/view', 'action=browse&selectedChild=tag'), FALSE);
31 $controller->set('contactId', $this->_contactId
);
32 $controller->process();
36 public function preProcess() {
37 $this->_contactId
= CRM_Utils_Request
::retrieve('cid', 'Positive', $this, TRUE);
38 $this->assign('contactId', $this->_contactId
);
40 // check logged in url permission
41 CRM_Contact_Page_View
::checkUserPermission($this);
43 $this->_action
= CRM_Utils_Request
::retrieve('action', 'String', $this, FALSE, 'browse');
44 $this->assign('action', $this->_action
);
48 * the main function that is called when the page loads
49 * it decides the which action has to be taken for the page.
53 public function run() {