];
// Collapse the details by default.
$build['columns'
]['third'
]['#open'
] = \Drupal::
config('views.settings'
)->
get('ui.show.advanced_column'
);
// Each option (e.g. title, access, display as grid/table/list) fits into one
// of several "buckets," or boxes (Format, Fields, Sort, and so on).
$buckets =
[];
// Fetch options from the display plugin, with a list of buckets they go into.
$options =
[];
$view->
getExecutable()->displayHandlers->
get($display['id'
])->
optionsSummary($buckets,
$options);
// Place each option into its bucket.
foreach ($options as $id =>
$option) { // Each option self-identifies as belonging in a particular bucket.
$buckets[$option['category'
]]['build'
][$id] =
$this->
buildOptionForm($view,
$id,
$option,
$display);
} // Place each bucket into the proper column.
foreach ($buckets as $id =>
$bucket) { // Let buckets identify themselves as belonging in a column.
if (isset($bucket['column'
]) &&
isset($build['columns'
][$bucket['column'
]])) {