3 * StatusNet - the distributed open-source microblogging tool
4 * Copyright (C) 2011, StatusNet, Inc.
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 if (!defined('STATUSNET')) {
26 function __construct(Profile $profile)
28 $this->profile = $profile;
29 $this->sections = $this->getSections();
30 $this->fields = $this->loadFields();
35 $detail = new Profile_detail();
36 $detail->profile_id = $this->profile->id;
39 while ($detail->get()) {
40 $fields[$detail->field][] = clone($detail);
45 function getSections()
49 'label' => _m('Personal'),
52 'label' => _m('Full name'),
53 'profile' => 'fullname',
57 'label' => _m('Title'),
61 'label' => _m('Manager'),
63 'vcard' => 'x-manager',
66 'label' => _m('Location'),
67 'profile' => 'location'
75 'label' => _m('Tags'),
82 'label' => _m('Contact'),
85 'label' => _m('Phone'),
96 'label' => _m('Websites'),
103 'label' => _m('Personal'),
106 'label' => _m('Birthday'),
111 'label' => _m('Spouse\'s name'),
112 'vcard' => 'x-spouse',
115 'label' => _m('Kids\' names')
119 'experience' => array(
120 'label' => _m('Work experience'),
122 'experience' => array(
123 'type' => 'experience',
124 'label' => _m('Employer'),
128 'education' => array(
129 'label' => _m('Education'),
131 'education' => array(
132 'type' => 'education',
133 'label' => _m('Institution'),