Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/query/PhabricatorPeopleSearchEngine.php
| Show First 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | protected function renderResultList( | ||||
| $result->setObjectList($list); | $result->setObjectList($list); | ||||
| $result->setNoDataString(pht('No accounts found.')); | $result->setNoDataString(pht('No accounts found.')); | ||||
| return $result; | return $result; | ||||
| } | } | ||||
| protected function newExportFields() { | protected function newExportFields() { | ||||
| return array( | return array( | ||||
| id(new PhabricatorIDExportField()) | |||||
| ->setKey('id') | |||||
| ->setLabel(pht('ID')), | |||||
| id(new PhabricatorPHIDExportField()) | |||||
| ->setKey('phid') | |||||
| ->setLabel(pht('PHID')), | |||||
| 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()) | id(new PhabricatorEpochExportField()) | ||||
| ->setKey('created') | ->setKey('created') | ||||
| ->setLabel(pht('Date Created')), | ->setLabel(pht('Date Created')), | ||||
| ); | ); | ||||
| } | } | ||||
| public function newExport(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( | ||||
| 'id' => $user->getID(), | |||||
| 'phid' => $user->getPHID(), | |||||
| 'username' => $user->getUsername(), | 'username' => $user->getUsername(), | ||||
| 'realName' => $user->getRealName(), | 'realName' => $user->getRealName(), | ||||
| 'created' => $user->getDateCreated(), | 'created' => $user->getDateCreated(), | ||||
| ); | ); | ||||
| } | } | ||||
| return $export; | return $export; | ||||
| } | } | ||||
| } | } | ||||