You are here

function _social_user_export_get_view in Open Social 8.2

Same name and namespace in other branches
  1. 8 modules/social_features/social_user_export/social_user_export.module \_social_user_export_get_view()
  2. 8.3 modules/social_features/social_user_export/social_user_export.module \_social_user_export_get_view()
  3. 8.4 modules/social_features/social_user_export/social_user_export.module \_social_user_export_get_view()

Returns the user admin people view.

Parameters

array $query: Query parameters for exposed filters.

bool $execute: If TRUE, views query will be executed.

Return value

\Drupal\views\ViewExecutable The requested view.

2 calls to _social_user_export_get_view()
ExportUser::exportUsersAllOperation in modules/social_features/social_user_export/src/ExportUser.php
Callback of massive operations.
ExportUserConfirm::buildForm in modules/social_features/social_user_export/src/Form/ExportUserConfirm.php
Form constructor.

File

modules/social_features/social_user_export/social_user_export.module, line 76
The Social User Export module.

Code

function _social_user_export_get_view(array $query = [], $execute = TRUE) {
  $view = Views::getView('user_admin_people');
  $view
    ->setDisplay('page_1');
  $view
    ->setExposedInput($query);
  if ($execute) {
    $view
      ->preExecute();
    $view
      ->execute();
  }
  return $view;
}