本文整理汇总了PHP中XCube_DelegateUtils::call方法的典型用法代码示例。如果您正苦于以下问题:PHP XCube_DelegateUtils::call方法的具体用法?PHP XCube_DelegateUtils::call怎么用?PHP XCube_DelegateUtils::call使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XCube_DelegateUtils
的用法示例。
在下文中一共展示了XCube_DelegateUtils::call方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: resign
function resign(&$flag, &$controller, &$xoopsUser)
{
$handler =& xoops_gethandler('member');
$groups = $handler->getGroupsByUser($xoopsUser->get('uid'));
foreach ($groups as $group) {
$handler->removeUserFromGroup($group, $xoopsUser->get('uid'));
}
$handler->addUserToGroup(RESIGN_USER_GROUP_ID, $xoopsUser->get('uid'));
xoops_notification_deletebyuser($xoopsUser->get('uid'));
XCube_DelegateUtils::call('Legacy.Event.UserDelete', new XCube_Ref($xoopsUser));
$flag = true;
$root =& XCube_Root::getSingleton();
// Reset session
$_SESSION = array();
$root->mSession->destroy(true);
// reset online
$handler =& xoops_gethandler('online');
$handler->destroy($xoopsUser->get('uid'));
xoops_notification_deletebyuser($xoopsUser->get('uid'));
// Redirect not to call behind delegates.
$langMgr =& $root->getLanguageManager();
$langMgr->loadPageTypeMessageCatalog('user');
$controller =& $root->getController();
$controller->executeRedirect(XOOPS_URL, 3, _US_BEENDELED);
}
示例2: b_legacy_waiting_show
function b_legacy_waiting_show()
{
$modules = array();
XCube_DelegateUtils::call('Legacyblock.Waiting.Show', new XCube_Ref($modules));
$block['modules'] = $modules;
return $block;
}
示例3: smarty_function_legacy_tag_cloud
function smarty_function_legacy_tag_cloud($params, &$smarty)
{
$tDirname = $params['tDirname'];
$dirname = isset($params['dirname']) ? $params['dirname'] : null;
$dataname = isset($params['dataname']) ? $params['dataname'] : null;
$uidList = isset($params['uidList']) ? $params['uidList'] : null;
$max = isset($params['max']) ? $params['max'] : 200; //font size(%)
$min = isset($params['min']) ? $params['min'] : 80; //font size(%)
$template = isset($params['template']) ? $params['template'] : 'legacy_inc_tag_cloud.html';
$cloud = array();
XCube_DelegateUtils::call('Legacy_Tag.'.$tDirname.'.GetTagCloudSrc',
new XCube_Ref($cloud),
$tDirname,
$dirname,
$dataname,
$uidList
);
$sizeArr = _smarty_function_legacy_tag_cloud_get_size($cloud, $max, $min);
//render template
$render = new XCube_RenderTarget();
$render->setTemplateName($template);
$render->setAttribute('legacy_buffertype',XCUBE_RENDER_TARGET_TYPE_MAIN);
$render->setAttribute('dirname', $tDirname);
$render->setAttribute('cloud', $cloud);
$render->setAttribute('sizeArr', $sizeArr);
XCube_Root::getSingleton()->getRenderSystem('Legacy_RenderSystem')->render($render);
echo $render->getResult();
}
示例4: smarty_function_legacy_map_edit
function smarty_function_legacy_map_edit($params, &$smarty)
{
$dirname = isset($params['dirname']) ? $params['dirname'] : null;
$dataname = isset($params['dataname']) ? $params['dataname'] : null;
$dataId = isset($params['data_id']) ? $params['data_id'] : null;
$addressId = isset($params['geocode']) ? $params['geocode'] : null;
$template = isset($params['template']) ? $params['template'] : 'legacy_inc_map_edit.html';
$places = array();
XCube_DelegateUtils::call('Legacy_Map.GetPlaces', new XCube_Ref($places), $dirname, $dataname, $dataId);
$root = XCube_Root::getSingleton();
$latitude = $root->mContext->mRequest->getRequest('latitude');
$longitude = $root->mContext->mRequest->getRequest('longitude');
$request = null;
if (isset($latitude) && isset($longitude)) {
$request = array('latitude' => $latitude, 'longitude' => $longitude, 'zoom' => 10);
}
//render template
$render = new XCube_RenderTarget();
$render->setTemplateName($template);
$render->setAttribute('legacy_buffertype', XCUBE_RENDER_TARGET_TYPE_MAIN);
$render->setAttribute('places', $places);
$render->setAttribute('geocode', $geocode);
$render->setAttribute('request', $request);
XCube_Root::getSingleton()->getRenderSystem('Legacy_RenderSystem')->render($render);
echo $render->getResult();
}
示例5: getDefaultView
function getDefaultView(&$controller, &$xoopsUser)
{
if (!isset($_REQUEST['actkey']) || !$this->mObject) {
$controller->executeForward(XOOPS_URL . '/');
}
if ($this->mObject->get('actkey') != xoops_getrequest('actkey')) {
$controller->executeRedirect(XOOPS_URL . '/', 3, _MD_USER_MESSAGE_ACTKEYNOT);
}
if ($this->mObject->get('level') > 0) {
$controller->executeRedirect(XOOPS_URL . '/user.php', 3, _MD_USER_MESSAGE_ACONTACT);
}
$this->mObject->set('level', '1');
//
// Force update with GET request
//
$this->mObjectHandler->insert($this->mObject, true);
if ($this->mConfig['activation_type'] == 2) {
$builder = new User_RegistAdminCommitMailBuilder();
$director = new User_UserRegistMailDirector($builder, $this->mObject, $controller->mRoot->mContext->getXoopsConfig(), $this->mConfig);
$director->contruct();
$mailer =& $builder->getResult();
XCube_DelegateUtils::call('Legacy.Event.RegistUser.SendMail', new XCube_Ref($mailer), 'Activated');
if ($mailer->send()) {
$controller->executeRedirect(XOOPS_URL . '/', 5, sprintf(_MD_USER_MESSAGE_ACTVMAILOK, $this->mObject->get('uname')));
} else {
$controller->executeRedirect(XOOPS_URL . '/', 5, sprintf(_MD_USER_MESSAGE_ACTVMAILNG, $this->mObject->get('uname')));
}
} else {
$controller->executeRedirect(XOOPS_URL . '/user.php', 5, _MD_USER_MESSAGE_ACTLOGIN);
}
}
示例6: smarty_function_legacy_tag_select
function smarty_function_legacy_tag_select($params, &$smarty)
{
$tDirname = $params['tDirname'];
$dirname = isset($params['dirname']) ? $params['dirname'] : null;
$dataname = isset($params['dataname']) ? $params['dataname'] : null;
$uidList = isset($params['uidList']) ? $params['uidList'] : null;
$tags = isset($params['tags']) ? $params['tags'] : null; //selected tags
$template = isset($params['template']) ? $params['template'] : 'legacy_inc_tag_select.html';
$cloud = array();
XCube_DelegateUtils::call('Legacy_Tag.'.$tDirname.'.GetTagCloudSrc',
new XCube_Ref($cloud),
$tDirname,
$dirname,
$dataname,
$uidList
);
//render template
$render = new XCube_RenderTarget();
$render->setTemplateName($template);
$render->setAttribute('legacy_buffertype',XCUBE_RENDER_TARGET_TYPE_MAIN);
$render->setAttribute('cloud', $cloud);
$render->setAttribute('tags', $tags);
XCube_Root::getSingleton()->getRenderSystem('Legacy_RenderSystem')->render($render);
echo $render->getResult();
}
示例7: smarty_function_legacy_comment
function smarty_function_legacy_comment($params, &$smarty)
{
$cDirname = $params['cDirname'];
$dirname = isset($params['dirname']) ? $params['dirname'] : null;
$dataname = isset($params['dataname']) ? $params['dataname'] : null;
$dataId = isset($params['data_id']) ? $params['data_id'] : 0;
$categoryId = isset($params['category_id']) ? $params['category_id'] : 0;
$comments = null;
XCube_DelegateUtils::call('Legacy_Comment.'.$cDirname.'.GetComments',
new XCube_Ref($comments),
$cDirname,
$dirname,
$dataname,
$dataId,
$categoryId,
$params
);
$template = isset($params['template']) ? $params['template'] : $comments['template'];
//render template
$render = new XCube_RenderTarget();
$render->setTemplateName($template);
$render->setAttribute('legacy_buffertype',XCUBE_RENDER_TARGET_TYPE_MAIN);
$render->setAttribute('comments', $comments);
XCube_Root::getSingleton()->getRenderSystem('Legacy_RenderSystem')->render($render);
echo $render->getResult();
}
示例8: execute
function execute(&$controller, &$xoopsUser)
{
if (XCube_Root::getSingleton()->mContext->mRequest->getRequest('_form_control_cancel') != null) {
return USER_FRAME_VIEW_CANCEL;
}
$memberHandler =& xoops_gethandler('member');
$this->mNewUser =& $memberHandler->createUser();
$this->mRegistForm->update($this->mNewUser);
$this->mNewUser->set('uorder', $controller->mRoot->mContext->getXoopsConfig('com_order'), true);
$this->mNewUser->set('umode', $controller->mRoot->mContext->getXoopsConfig('com_mode'), true);
if ($this->mConfig['activation_type'] == 1) {
$this->mNewUser->set('level', 1, true);
}
if (!$memberHandler->insertUser($this->mNewUser)) {
$this->mRedirectMessage = _MD_USER_LANG_REGISTERNG;
return USER_FRAME_VIEW_ERROR;
}
if (!$memberHandler->addUserToGroup(XOOPS_GROUP_USERS, $this->mNewUser->get('uid'))) {
$this->mRedirectMessage = _MD_USER_LANG_REGISTERNG;
return USER_FRAME_VIEW_ERROR;
}
$this->_clearRegistForm($controller);
$this->_processMail($controller);
$this->_eventNotifyMail($controller);
XCube_DelegateUtils::call('Legacy.Event.RegistUser.Success', new XCube_Ref($this->mNewUser));
return USER_FRAME_VIEW_SUCCESS;
}
示例9: XCube_Ref
/**
* &getPlayermapHandler
*
* @param string $name
* @param string $dirname
*
* @return XoopsObjectHandleer
**/
public static function &getPlayermapHandler($name, $dirname)
{
$asset = null;
XCube_DelegateUtils::call('Module.playermap.Global.Event.GetAssetManager', new XCube_Ref($asset), $dirname);
if (is_object($asset) && is_a($asset, 'Playermap_AssetManager')) {
return $asset->getObject('handler', $name);
}
}
示例10: _getProfile
/**
* @param string $key
* @return mixed
*/
protected function _getProfile($key)
{
if ($this->profile === null) {
XCube_DelegateUtils::call('Legacy_Profile.GetProfile', new XCube_Ref($this->profile), $this->get('uid'));
}
if ($this->profile instanceof XoopsSimpleObject) {
return $this->profile->get($key);
}
return null;
}
示例11: executeViewInput
/**
* executeViewInput
*
* @param XCube_RenderTarget &$render
*
* @return void
**/
public function executeViewInput(&$render)
{
$render->setTemplateName($this->mAsset->mDirname . '_group_delete.html');
$render->setAttribute('actionForm', $this->mActionForm);
$render->setAttribute('object', $this->mObject);
//breadcrumb
$breadcrumbs = array();
XCube_DelegateUtils::call('Module.' . $this->mAsset->mDirname . '.Global.Event.GetBreadcrumbs', new XCube_Ref($breadcrumbs), $this->mAsset->mDirname, $this->mObject);
$render->setAttribute('xoops_breadcrumbs', $breadcrumbs);
}
示例12: getClientList
/**
* getClientList
*
* @param string $dirname
*
* @return array
**/
public static function getClientList($dirname)
{
$clients = array();
$list = array();
XCube_DelegateUtils::call('Legacy_GroupClient.GetClientList', new XCube_Ref($clients), $dirname);
foreach ($clients as $module) {
$list[] = array('dirname' => trim($module['dirname']), 'dataname' => trim($module['dataname']), 'fieldname' => trim($module['fieldname']));
}
return $list;
}
示例13: smarty_function_xoops_explaceholder
function smarty_function_xoops_explaceholder($params, &$smarty)
{
$buf = null;
if (isset($params['control'])) {
XCube_DelegateUtils::call('Legacy.Event.Explaceholder.Get.' . $params['control'], new XCube_Ref($buf), $params);
if ($buf === null) {
XCube_DelegateUtils::call('Legacy.Event.Explaceholder.Get', new XCube_Ref($buf), $params['control'], $params);
}
}
return $buf;
}
示例14: _doExecute
function _doExecute()
{
XCube_DelegateUtils::call('Legacy.Admin.Event.UserDelete', new XCube_Ref($this->mObject));
$handler =& xoops_gethandler('member');
if ($handler->delete($this->mObject)) {
XCube_DelegateUtils::call('Legacy.Admin.Event.UserDelete.Success', new XCube_Ref($this->mObject));
return USER_FRAME_VIEW_SUCCESS;
} else {
XCube_DelegateUtils::call('Legacy.Admin.Event.UserDelete.Fail', new XCube_Ref($this->mObject));
return USER_FRAME_VIEW_ERROR;
}
}
示例15: executeViewIndex
/**
* executeViewIndex
*
* @param XCube_RenderTarget &$render
*
* @return void
**/
public function executeViewIndex(&$render)
{
$render->setTemplateName($this->mAsset->mDirname . '_group_list.html');
$render->setAttribute('objects', $this->mObjects);
$render->setAttribute('dirname', $this->mAsset->mDirname);
$render->setAttribute('dataname', 'group');
$render->setAttribute('pageNavi', $this->mFilter->mNavi);
//breadcrumb
$breadcrumbs = array();
XCube_DelegateUtils::call('Module.' . $this->mAsset->mDirname . '.Global.Event.GetBreadcrumbs', new XCube_Ref($breadcrumbs), $this->mAsset->mDirname);
$render->setAttribute('xoops_breadcrumbs', $breadcrumbs);
}