示例#1
0
 /**
  * @param NodeInterface $node The node that is currently edited (optional)
  * @param array $arguments Additional arguments (key / value)
  * @return array
  */
 public function getData(NodeInterface $node, array $arguments)
 {
     $options = [];
     foreach ($this->userService->getUsers() as $user) {
         $options[$this->persistenceManager->getIdentifierByObject($user)] = ['label' => $user->getLabel()];
     }
     return $options;
 }
 /**
  * List all users
  *
  * This command lists all existing Neos users.
  *
  * @return void
  */
 public function listCommand()
 {
     $users = $this->userService->getUsers();
     $tableRows = array();
     $headerRow = array('Name', 'Email', 'Account(s)', 'Role(s)', 'Active');
     foreach ($users as $user) {
         $tableRows[] = $this->getTableRowForUser($user);
     }
     $this->output->outputTable($tableRows, $headerRow);
 }
 /**
  * Creates an array of user names and their respective labels which are possible owners for a workspace.
  *
  * @return array
  */
 protected function prepareOwnerOptions()
 {
     $ownerOptions = ['' => '-'];
     foreach ($this->userService->getUsers() as $user) {
         /** @var User $user */
         $ownerOptions[$this->persistenceManager->getIdentifierByObject($user)] = $user->getLabel();
     }
     return $ownerOptions;
 }
 /**
  * Shows a list of all users
  *
  * @return void
  */
 public function indexAction()
 {
     $this->view->assignMultiple(array('currentUser' => $this->currentUser, 'users' => $this->userService->getUsers()));
 }