Merge pull request #4871 from eileenmcnaughton/CRM-15795
[civicrm-core.git] / CRM / Contact / Page / View / Relationship.php
index 944a373f1332cacb7d9d297e3ca9c9a9048a1171..354b00e08a4720c24c105c8c154359a328fd37dd 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -43,7 +43,7 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
   static $_links = NULL;
 
   /**
-   * casid set if called from case context
+   * Casid set if called from case context
    *
    * @var int
    */
@@ -57,9 +57,8 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
    *
    * @return void
    *
-   * @access public
    */
-  function view() {
+  public function view() {
     $viewRelationship = CRM_Contact_BAO_Relationship::getRelationship($this->_contactId, NULL, NULL, NULL, $this->_id);
     //To check whether selected contact is a contact_id_a in
     //relationship type 'a_b' in relationship table, if yes then
@@ -102,7 +101,6 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
       "action=view&reset=1&id={$viewRelationship[$this->_id]['id']}&cid={$this->_contactId}&context=home"
     );
 
-
     $session = CRM_Core_Session::singleton();
     $recentOther = array();
 
@@ -140,9 +138,8 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
    * This function is called when action is browse
    *
    * return null
-   * @access public
    */
-  function browse() {
+  public function browse() {
     // do nothing :) we are using datatable for rendering relationship selectors
   }
 
@@ -150,9 +147,8 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
    * This function is called when action is update or new
    *
    * return null
-   * @access public
    */
-  function edit() {
+  public function edit() {
     $controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_Relationship', ts('Contact Relationships'), $this->_action);
     $controller->setEmbedded(TRUE);
 
@@ -190,7 +186,7 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
     $controller->run();
   }
 
-  function preProcess() {
+  public function preProcess() {
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
     $this->assign('contactId', $this->_contactId);
@@ -207,9 +203,8 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
    * it decides the which action has to be taken for the page.
    *
    * return null
-   * @access public
    */
-  function run() {
+  public function run() {
     $this->preProcess();
 
     $this->setContext();
@@ -243,7 +238,7 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
     return parent::run();
   }
 
-  function setContext() {
+  public function setContext() {
     $context = CRM_Utils_Request::retrieve('context', 'String',
       $this, FALSE, 'search'
     );
@@ -267,9 +262,8 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
    * This function is called to delete the relationship of a contact
    *
    * return null
-   * @access public
    */
-  function delete() {
+  public function delete() {
     // calls a function to delete relationship
     CRM_Contact_BAO_Relationship::del($this->_id);
   }
@@ -280,7 +274,7 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
    * @return array (reference) of action links
    * @static
    */
-  static function &links() {
+  public static function &links() {
     if (!(self::$_links)) {
       self::$_links = array(
         CRM_Core_Action::VIEW => array(
@@ -324,4 +318,3 @@ class CRM_Contact_Page_View_Relationship extends CRM_Core_Page {
     return self::$_links;
   }
 }
-