Render all views for a specific region.

@param string $region which region to use

@return $this
439623
public function render($region = 'main')
    {
        if (!isset($this->views[$region])) {
            return $this;
        }

        mergesort($this->views[$region], function ($a, $b) {
            $sa = $a->sortOrder();
            $sb = $b->sortOrder();

            if ($sa == $sb) {
                return 0;
            }

            return $sa < $sb ? -1 : 1;
        });

        foreach ($this->views[$region] as $view) {
            $view->render();
        }

        return $this;
    }
775173
function(region) {
    if (this._isShown) {
      throw new Error('This component is already shown in a region.');
    }

    if (!region) {
      throw new Error('Please supply a region to show inside.');
    }

    this.region = region;

    this.triggerMethod('before:show');

    this._showView();
    this._isShown = true;

    this.triggerMethod('show');
  }
1248432
public function getRegion($region)
    {
        $session = $this->getSession();
        $regionObj = $session->getPage()->find('region', $region);
        if (!$regionObj) {
            throw new \Exception(sprintf('No region "%s" found on the page %s.', $region, $session->getCurrentUrl()));
        }

        return $regionObj;
    }
412265
protected function __renderWidgets($region, array $widgets, ModelInterface $viewModel)
    {
        foreach($widgets as $widget) {
            if (!$widget instanceof WidgetInterface)
                $widget = $this->___attainWidgetInstance($widget);

            // Render Widget
            $content = $widget->render();

            // TODO maybe we want to add filter or event on rendering widget contents
            $viewModel->{$region} .= $content;
        }
    }
222705
public Region region (final float rx, final float ry, final float rwidth, final float rheight) {
    final Image image = this;
    return new Region() {
      private Tile tile;
      @Override public boolean isLoaded () { return image.isLoaded(); }
      @Override public Tile tile () {
        if (tile == null) tile = image.texture().tile(rx, ry, rwidth, rheight);
        return tile;
      }
      @Override public RFuture<Tile> tileAsync () {
        return image.state.map(new Function<Image,Tile>() {
          public Tile apply (Image image) { return tile(); }
        });
      }

      @Override public float width () { return rwidth; }
      @Override public float height () { return rheight; }

      @Override public void draw (Object ctx, float x, float y, float width, float height) {
        image.draw(ctx, x, y, width, height, rx, ry, rwidth, rheight);
      }
      @Override public void draw (Object ctx, float dx, float dy, float dw, float dh,
                                  float sx, float sy, float sw, float sh) {
        image.draw(ctx, dx, dy, dw, dh, rx+sx, ry+sy, sw, sh);
      }
    };
  }
385802
public function ensure_content_created($region, $output) {
        $this->ensure_instances_exist($region);
        if (!array_key_exists($region, $this->visibleblockcontent)) {
            $contents = array();
            if (array_key_exists($region, $this->extracontent)) {
                $contents = $this->extracontent[$region];
            }
            $contents = array_merge($contents, $this->create_block_contents($this->blockinstances[$region], $output, $region));
            if (($region == $this->defaultregion) && (!isset($this->page->theme->addblockposition) ||
                    $this->page->theme->addblockposition == BLOCK_ADDBLOCK_POSITION_DEFAULT)) {
                $addblockui = block_add_block_ui($this->page, $output);
                if ($addblockui) {
                    $contents[] = $addblockui;
                }
            }
            $this->visibleblockcontent[$region] = $contents;
        }
    }
442006
public function contentToRegion($region, $content)
    {
        $regions = $this->contentRegion->findBy(array('content' => $content));

        if (count($regions) === 1 and $regions[0]->getRegion()->getName() === $region->getName()) {
            $this->deleteRegions($content, $regions);
        } else {
            $this->deleteRegions($content, $regions);

            $first = $this->contentRegion->findOneBy(array('back' => null, 'region' => $region));
            $contentRegion = new Content2Region($first);
            $contentRegion->setRegion($region);
            $contentRegion->setContent($content);
            $this->manager->persist($contentRegion);
            $this->manager->flush();
        }
    }
1098671
private function _getRegionPropertyFor($region, $properties)
	{
		$this->_validateRegionIsDefined($region, $this->_regionMappings);	
		return $properties[$this->_regionMappings[$region]];
	}
1231212
protected function __renderWidgets($region, array $widgets, ModelInterface $viewModel)
    {
        k(__FUNCTION__);

        foreach($widgets as $widget) {
            $widget = $this->___attainWidgetInstance($widget);

            // Render Widget
            $content = $widget->render();

            // TODO maybe we want to add filter or event on rendering widget contents
            $viewModel->{$region} .= $content;
        }
    }
940362
public function translateToXPath($region)
    {
        if (!isset($this->regionMap[$region])) {
            throw new \InvalidArgumentException(sprintf('The "%s" region isn\'t configured!', $region));
        }
        $css = $this->regionMap[$region];

        return $this->cssSelector->translateToXPath($css);
    }
1143395
public function setRegion( string $region ): self
	{
		$this->setSetting(self::SET_REGION, $this->regions->getRegionName($region));
		$this->setSetting(self::SET_PLATFORM, $this->platforms->getPlatformName($region));
		return $this;
	}
134644
def region_selection(request):
    ''' '''
    form = get_region_select_form(request.GET)
    abbr = form.data.get('abbr')
    if not abbr or len(abbr) != 2:
        return redirect('homepage')
    return redirect('region', abbr=abbr)
335923
public function renderSections()
    {
        $env = $this->factory;

        return $this->render(function ($view) use ($env) {
            return $env->getSections();
        });
    }
843535
public function render($view = null)
    {
        $this->findActivePage();
        $this->filterByAccessRights();
        $this->filterEmptyPages();

        $this->sort();

        if (is_null($view)) {
            $view = config('navigation.view.navigation', 'navigation::navigation');
        }

        return view($view, $this->toArray())->render();
    }
845123
public function iFillinTheRegion($field, $value, $region){
        $context = $this->getMainContext();
        $regionObj = $context->getRegionObj($region);
        assertNotNull($regionObj, "Region Object is null");

        $fieldObj = $regionObj->findField($field);
        if (empty($fieldObj)) {
			throw new \Exception(sprintf('The field "%s" was not found in the region "%s" 
				on the page %s', $field, $region, $this->getSession()->getCurrentUrl()));
        }

        $regionObj->fillField($field, $value);
    }
280166
public function setName($region)
    {
        $region = strtolower($region);
        if (in_array($region, $this->possibleOptions)) {
            $this->name = $region;
        } else {
            throw new InvalidRegionException;
        }
    }
500703
public function getRegion() : ?string 
    {
        if ( ! $this->hasRegion()) {
            $this->setRegion($this->getDefaultRegion());
        }
        return $this->region;
    }