1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18:
19: function smarty_function_legacy_profile($params, &$smarty)
20: {
21: $uid = isset($params['uid']) ? intval($params['uid']) : Legacy_Utils::getUid();
22: if($uid===0){
23: return;
24: }
25: $profileActionForm = isset($params['actionForm']) ? $params['actionForm'] : null;
26: $action = isset($params['action']) ? $params['action'] : 'view';
27: $template = isset($params['template']) ? $params['template'] : 'profile_inc_data_view.html';
28:
29: $defArr = null;
30: XCube_DelegateUtils::call(
31: 'Legacy_Profile.GetDefinition',
32: new XCube_Ref($defArr),
33: $action
34: );
35:
36: $profile = null;
37: XCube_DelegateUtils::call(
38: 'Legacy_Profile.GetProfile',
39: new XCube_Ref($profile),
40: $uid
41: );
42:
43:
44: $render = new XCube_RenderTarget();
45: $render->setTemplateName($template);
46: $render->setAttribute('legacy_buffertype',XCUBE_RENDER_TARGET_TYPE_MAIN);
47: $render->setAttribute('profileForm', $profileActionForm);
48: $render->setAttribute('profile', $profile);
49: $render->setAttribute('defArr', $defArr);
50: XCube_Root::getSingleton()->getRenderSystem('Legacy_RenderSystem')->render($render);
51:
52: echo $render->getResult();
53: }
54:
55: ?>
56: