本文整理汇总了PHP中CRM_Core_Controller_Simple::setEmbedded方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Controller_Simple::setEmbedded方法的具体用法?PHP CRM_Core_Controller_Simple::setEmbedded怎么用?PHP CRM_Core_Controller_Simple::setEmbedded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_Controller_Simple
的用法示例。
在下文中一共展示了CRM_Core_Controller_Simple::setEmbedded方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
/**
* called when action is update.
*
* @param int $groupId
*
* @return null
*/
public function edit($groupId = NULL)
{
$this->assign('edit', $this->_edit);
if (!$this->_edit) {
return NULL;
}
$action = CRM_Utils_Request::retrieve('action', 'String', CRM_Core_DAO::$_nullObject, FALSE, 'browse');
if ($action == CRM_Core_Action::DELETE) {
$groupContactId = CRM_Utils_Request::retrieve('gcid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE);
$status = CRM_Utils_Request::retrieve('st', 'String', CRM_Core_DAO::$_nullObject, TRUE);
if (is_numeric($groupContactId) && $status) {
CRM_Contact_Page_View_GroupContact::del($groupContactId, $status, $this->_contactId);
}
$url = CRM_Utils_System::url('civicrm/user', "reset=1&id={$this->_contactId}");
CRM_Utils_System::redirect($url);
}
$controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_GroupContact', ts("Contact's Groups"), CRM_Core_Action::ADD, FALSE, FALSE, TRUE, FALSE);
$controller->setEmbedded(TRUE);
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/user', "reset=1&id={$this->_contactId}"), FALSE);
$controller->reset();
$controller->set('contactId', $this->_contactId);
$controller->set('groupId', $groupId);
$controller->set('context', 'user');
$controller->set('onlyPublicGroups', $this->_onlyPublicGroups);
$controller->process();
$controller->run();
}
示例2: edit
/**
* called when action is update or new.
*
* @return null
*/
public function edit()
{
$controller = new CRM_Core_Controller_Simple('CRM_Pledge_Form_Pledge', 'Create Pledge', $this->_action);
$controller->setEmbedded(TRUE);
$controller->set('id', $this->_id);
$controller->set('cid', $this->_contactId);
return $controller->run();
}
示例3: cancel
/**
* This function is called when action is cancel
*
* return null
* @access public
*/
function cancel()
{
$controller = new CRM_Core_Controller_Simple('CRM_Booking_Form_Booking_Cancel', ts('Booking'), $this->_action);
$controller->setEmbedded(TRUE);
$controller->set('id', $this->_id);
$controller->set('cid', $this->_contactId);
return $controller->run();
}
示例4: edit
/**
* This function is called when action is update or new
*
* return null
* @access public
*/
function edit()
{
$controller = new CRM_Core_Controller_Simple('CRM_Pledge_Form_Payment', 'Update Pledge Payment', $this->_action);
$pledgePaymentId = CRM_Utils_Request::retrieve('ppId', 'Positive', $this);
$controller->setEmbedded(TRUE);
$controller->set('id', $pledgePaymentId);
return $controller->run();
}
示例5: run
/**
* Run the page.
*
* This method is called after the page is created.
*
* @return void
* @access public
*
*/
function run()
{
$controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_Task_Useradd', ts('Add User'), CRM_Core_Action::ADD);
$controller->setEmbedded(TRUE);
$controller->process();
$controller->run();
return parent::run();
}
示例6: listParticipations
/**
* Function to list participations for the UF user
*
* return null
* @access public
*/
function listParticipations()
{
$controller = new CRM_Core_Controller_Simple('CRM_Event_Form_Search', ts('Events'), NULL);
$controller->setEmbedded(TRUE);
$controller->reset();
$controller->set('context', 'user');
$controller->set('cid', $this->_contactId);
$controller->set('force', 1);
$controller->process();
$controller->run();
}
示例7: edit
/**
* Edit name and address of a contact.
*/
public function edit()
{
// set the userContext stack
$session = CRM_Core_Session::singleton();
$url = CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $this->_contactId);
$session->pushUserContext($url);
$controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_Contact', ts('Contact Page'), CRM_Core_Action::UPDATE);
$controller->setEmbedded(TRUE);
$controller->process();
return $controller->run();
}
示例8: browse
/**
* This function is called when action is browse
*
* return null
* @access public
*/
function browse()
{
$controller = new CRM_Core_Controller_Simple('CRM_Tag_Form_Tag', ts('Contact Tags'), $this->_action);
$controller->setEmbedded(TRUE);
// set the userContext stack
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/contact/view', 'action=browse&selectedChild=tag'), FALSE);
$controller->reset();
$controller->set('contactId', $this->_contactId);
$controller->process();
$controller->run();
}
示例9: run
/**
* This function is the main function that is called when the page loads,
* it decides the which action has to be taken for the page.
*
* return null
* @access public
*/
function run()
{
$this->preProcess();
$controller = new CRM_Core_Controller_Simple('CRM_Grant_Form_Search', ts('grants'), NULL);
$controller->setEmbedded(TRUE);
$controller->reset();
$controller->set('limit', 10);
$controller->set('force', 1);
$controller->set('context', 'dashboard');
$controller->process();
$controller->run();
return parent::run();
}
示例10: edit
/**
* This function is called when action is update
*
* @param int $groupID group id
*
* return null
* @access public
*/
function edit($groupId = NULL)
{
$controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_GroupContact', ts('Contact\'s Groups'), $this->_action);
$controller->setEmbedded(TRUE);
// set the userContext stack
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/contact/view', "action=browse&selectedChild=group&cid={$this->_contactId}"), FALSE);
$controller->reset();
$controller->set('contactId', $this->_contactId);
$controller->set('groupId', $groupId);
$controller->process();
$controller->run();
}
示例11: edit
/**
* This function is called when action is update or new
*
* return null
* @access public
*/
function edit()
{
$controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_APIKey', ts('API Key'), $this->_action);
$controller->setEmbedded(TRUE);
// set the userContext stack
$session = CRM_Core_Session::singleton();
$url = CRM_Utils_System::url('civicrm/contact/view/apikey', 'action=browse&selectedChild=apikey&cid=' . $this->_contactId);
$session->pushUserContext($url);
$controller->reset();
$controller->set('contactId', $this->_contactId);
$controller->process();
$controller->run();
}
示例12: listActivities
/**
* Function to list participations for the UF user
*
* return null
* @access public
*/
function listActivities()
{
$controller = new CRM_Core_Controller_Simple('CRM_Activity_Form_Search', ts('Activities'), NULL, FALSE, FALSE, TRUE, FALSE);
$controller->setEmbedded(TRUE);
$controller->reset();
$controller->set('context', 'user');
$controller->set('cid', $this->_contactId);
$controller->set('status', array(1 => 'on', 7 => 'on'));
$controller->set('activity_role', 2);
$controller->set('force', 1);
$controller->process();
$controller->run();
return;
}
示例13: listActivities
/**
* List participations for the UF user.
*
* @return bool
*/
public function listActivities()
{
$controller = new CRM_Core_Controller_Simple('CRM_Activity_Form_Search', ts('Activities'), NULL, FALSE, FALSE, TRUE, FALSE);
$controller->setEmbedded(TRUE);
$controller->reset();
$controller->set('context', 'user');
$controller->set('cid', $this->_contactId);
// Limit to status "Scheduled" and "Available"
$controller->set('status', array('IN' => array(1, 7)));
$controller->set('activity_role', 2);
$controller->set('force', 1);
$controller->process();
$controller->run();
return FALSE;
}
示例14: run
/**
* Run the page.
*
* This method is called after the page is created.
*/
public function run()
{
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
$this->assign('contactId', $contactId);
$this->assign('actionsMenuList', CRM_Contact_BAO_Contact::contextMenu($contactId));
CRM_Contact_Page_View::addUrls($this, $contactId);
// also create the form element for the activity links box
$controller = new CRM_Core_Controller_Simple('CRM_Activity_Form_ActivityLinks', ts('Activity Links'), NULL);
$controller->setEmbedded(TRUE);
$controller->run();
// check logged in user permission
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
// finally call parent
parent::run();
}
示例15: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @return void
* @access public
*
*/
function run()
{
//if javascript is enabled
if (CRM_Utils_Request::retrieve('confirmed', 'Boolean', $this, '', '', 'GET')) {
CRM_Core_BAO_CMSUser::synchronize();
return;
}
$controller = new CRM_Core_Controller_Simple('CRM_Admin_Form_CMSUser', 'Synchronize CMS Users');
// set the userContext stack
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
$controller->setEmbedded(TRUE);
$controller->process();
$controller->run();
return parent::run();
}