systemRegionList example

$placement = FALSE;
    if ($this->request->query->has('block-placement')) {
      $placement = $this->request->query->get('block-placement');
      $form['#attached']['drupalSettings']['blockPlacement'] = $placement;
      // Remove the block placement from the current request so that it is not       // passed on to any redirect destinations.       $this->request->query->remove('block-placement');
    }

    // Loop over each region and build blocks.     $regions = $this->systemRegionList($this->getThemeName(), REGIONS_VISIBLE);
    foreach ($regions as $region => $title) {
      $form['#tabledrag'][] = [
        'action' => 'match',
        'relationship' => 'sibling',
        'group' => 'block-region-select',
        'subgroup' => 'block-region-' . $region,
        'hidden' => FALSE,
      ];
      $form['#tabledrag'][] = [
        'action' => 'order',
        'relationship' => 'sibling',
        

  public function getConfirmText() {
    return $this->t('Remove');
  }

  /** * {@inheritdoc} */
  public function getQuestion() {
    $entity = $this->getEntity();
    $regions = $this->systemRegionList($entity->getTheme(), REGIONS_VISIBLE);
    return $this->t('Are you sure you want to remove the @entity-type %label from the %region region?', [
      '@entity-type' => $entity->getEntityType()->getSingularLabel(),
      '%label' => $entity->label(),
      '%region' => $regions[$entity->getRegion()],
    ]);
  }

  /** * {@inheritdoc} */
  public function getDescription() {
    
Home | Imprint | This part of the site doesn't use cookies.