*
* @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
"action=view&reset=1&id={$viewRelationship[$this->_id]['id']}&cid={$this->_contactId}&context=home"
);
-
$session = CRM_Core_Session::singleton();
$recentOther = array();
* 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
}
* 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);
$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);
* 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();
return parent::run();
}
- function setContext() {
+ public function setContext() {
$context = CRM_Utils_Request::retrieve('context', 'String',
$this, FALSE, 'search'
);
* 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);
}
* @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(
return self::$_links;
}
}
-