Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/query/PhabricatorPeopleSearchEngine.php
| Show First 20 Lines • Show All 322 Lines • ▼ Show 20 Lines | final class PhabricatorPeopleSearchEngine | ||||
| protected function newExportFields() { | protected function newExportFields() { | ||||
| return array( | return array( | ||||
| id(new PhabricatorStringExportField()) | id(new PhabricatorStringExportField()) | ||||
| ->setKey('username') | ->setKey('username') | ||||
| ->setLabel(pht('Username')), | ->setLabel(pht('Username')), | ||||
| id(new PhabricatorStringExportField()) | id(new PhabricatorStringExportField()) | ||||
| ->setKey('realName') | ->setKey('realName') | ||||
| ->setLabel(pht('Real Name')), | ->setLabel(pht('Real Name')), | ||||
| id(new PhabricatorEpochExportField()) | |||||
| ->setKey('created') | |||||
| ->setLabel(pht('Date Created')), | |||||
| ); | ); | ||||
| } | } | ||||
| protected function newExportData(array $users) { | protected function newExportData(array $users) { | ||||
| $viewer = $this->requireViewer(); | $viewer = $this->requireViewer(); | ||||
| $export = array(); | $export = array(); | ||||
| foreach ($users as $user) { | foreach ($users as $user) { | ||||
| $export[] = array( | $export[] = array( | ||||
| 'username' => $user->getUsername(), | 'username' => $user->getUsername(), | ||||
| 'realName' => $user->getRealName(), | 'realName' => $user->getRealName(), | ||||
| 'created' => $user->getDateCreated(), | |||||
| ); | ); | ||||
| } | } | ||||
| return $export; | return $export; | ||||
| } | } | ||||
| } | } | ||||