You are here

protected function BlockVisibilityGroupedListBuilder::getCurrentBlockVisibilityGroup in Block Visibility Groups 8

Get the group from the query string.

Return value

mixed|string

2 calls to BlockVisibilityGroupedListBuilder::getCurrentBlockVisibilityGroup()
BlockVisibilityGroupedListBuilder::buildForm in src/BlockVisibilityGroupedListBuilder.php
Form constructor.
BlockVisibilityGroupedListBuilder::getEntityIds in src/BlockVisibilityGroupedListBuilder.php
Unset blocks that should not be shown with current group.

File

src/BlockVisibilityGroupedListBuilder.php, line 185

Class

BlockVisibilityGroupedListBuilder
Extends BlockListBuilder to add our elements only show certain blocks.

Namespace

Drupal\block_visibility_groups

Code

protected function getCurrentBlockVisibilityGroup() {
  $request_id = $this->request->query
    ->get('block_visibility_group');
  if (!$request_id) {
    $request_id = BlockVisibilityGroupedListBuilder::ALL_GROUP;
  }
  return $request_id;
}