Render account connect page.

@author Vova Feldman (@svovaf)
@since  1.0.7
351073
function _connect_page_render() {
            $this->_logger->entrance();

            $vars = array( 'id' => $this->_module_id );

            /**
             * Added filter to the template to allow developers wrapping the template
             * in custom HTML (e.g. within a wizard/tabs).
             *
             * @author Vova Feldman (@svovaf)
             * @since  1.2.1.6
             */
            echo $this->apply_filters( 'templates/connect.php', fs_get_template( 'connect.php', $vars ) );
        }
1087621
public function render()
    {
        $oConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (!$oConfig->getConfigParam("blInvitationsEnabled")) {
            \OxidEsales\Eshop\Core\Registry::getUtils()->redirect($oConfig->getShopHomeUrl());

            return;
        }

        parent::render();

        return $this->getUser() ? $this->_sThisTemplate : $this->_sThisLoginTemplate;
    }
246474
public function render()
    {
        $this->getWpBridge()->addFilter('timber_post_getter_get_posts', [$this, 'addWpBridgeToPosts'], 10, 3);

        $context   = $this->getContext();
        $templates = $this->getTemplates();

        $this->validateTemplates($templates);
        $this->validateContext($context);

        $this->getTimberBridge()->render(
            $templates,
            array_merge($this->getTimberBridge()->getContext(), $context),
            ($this->getCacheExpiresSeconds() ?: false), // False disables cache altogether.
            $this->getCacheMode()
        );
    }
938666
public function render() {
		
		$router = Router::getInstance();
		
		// count can’t be null
		if (!$this->count) {
			return '';
		}
		
		// round the page count
		$pages = (int)ceil((int)$this->count / $this->perPage);
		
		// hide bar in case of 1 page only
		if ($pages < 2 and $this->hideEmpty) {
			return '';
		}
		
		// start main pagination DOM object
		$render = '<div class="pagination"><nav aria-label="Page navigation"><ul class="pagination">';
		
		// left arrow for first page
		if ($this->page > 1) {
			$render .= '<li class="page-item arrow"><a class="page-link" href="' . $router->getPageUrl(1) . '">«</a></li>';
		}

		// calculate page range
		if ($this->page > 5 and $this->page+5 > $pages) {
			$max = $pages;
			$min = ($max-10) > 0 ? $max-10 : 1;
		} else if ($this->page <= 5) {
			$min = 1;
			$max = $pages < 10 ? $pages : 10;
		} else {
			$min = ($this->page-5) > 0 ? $this->page-5 : 1;
			$max = ($this->page+5 <= $pages) ? $this->page+5 : $pages;
		}

		// render all pages number
		for ($i=$min; $i <= $max; $i++) {
			
			if ($i==$this->page) {
				$render .= '<li class="page-item current active"><a class="page-link" href="' . $router->getPageUrl($i) . '">' . $i . '</a></li>';
			} else {
				$render .= '<li class="page-item"><a class="page-link" href="' . $router->getPageUrl($i) . '">' . $i . '</a></li>';
			}
			
		}
		
		// right arrow for last page
		if ($this->page < $pages) {
			$render .= '<li class="page-item arrow"><a class="page-link" href="' . $router->getPageUrl($pages) . '">»</a></li>';
		}
		
		// close the bar
		$render .= '</ul></nav></div>';
		
		return $render;
		
	}
1125379
public function render() {

		$app = Application::getInstance();

		$ret = '';

		foreach ($this->items as $item) {
			
			// check on permissions
			if (isset($item->url) and !(is_a($app->currentUser, 'Pair\User') and !$app->currentUser->canAccess($item->url))) {
				continue;
			}
			
			switch ($item->type) {
				
				// single menu item rendering
				case 'single':

					$class  = ($item->url == $app->activeMenuItem ? ' active' : '');

					if ($item->class) {
						$class .= ' ' . $item->class;
					}

					// if url set <a>, otherwise set <div>
					$ret .= $item->url ? '<a href="' . $item->url . '"' : '<div'; 
					
					$ret .= ' class="item' . $class . '"' .
						($item->target ? ' target="' . $item->target . '"' : '') .
						(!is_null($item->badge) ? ' data-badge="' . (int)$item->badge . '" ' : '') .
						'>' .
						(!is_null($item->badge) ? '<span class="badge">' . $item->badge . '</span>' : '') .
						'<span class="title">' . $item->title . '</span>';

					// if url close </a>, otherwise close </div>
					$ret .= $item->url ? '</a>' : '</div>'; 
					break;

				// menu item with many sub-items rendering
				case 'multi':

					$links		= '';
					$menuClass	= '';

					// builds each sub-item link
					foreach ($item->list as $i) {

						// check on permissions
						if (isset($i->url) and !(is_a($app->currentUser, 'Pair\User') and !$app->currentUser->canAccess($i->url))) {
							continue;
						}
						
						if ($i->url == $app->activeMenuItem) {
							$class		= ' active';
							$menuClass	= ' open';
						} else {
							$class		= '';
						}

						if ($i->class) {
							$class .= ' ' . $i->class;
						}

						$links .= '<a class="item' . $class . '" href="' . $i->url . '">' .
							(!is_null($i->badge) ? '<span class="badge">' . $i->badge . '</span>' : '') .
							'<span class="title">' . $i->title . '</span>' .
							'</a>';
					}
					
					// prevent empty multi-menu
					if ('' == $links) {
						break;
					}
					
					// assembles the multi-menu
					$ret .= '<div class="dropDownMenu' . $menuClass . '">' .
						'<div class="title">' . $item->title . '</div>' .
						'<div class="itemGroup">' . $links . '</div></div>';
					break;
					
				case 'separator':

					if (!$item->title) $item->title = '&nbsp;';
					$ret .= '<div class="separator">' . $item->title . '</div>';
					break;

			}

		}

		return $ret;

	}
637377
public function render() {

		$this->screen = get_current_screen();

		if ( ! $this->is_active() ) {
			return;
		}

		$this->screen->add_help_tab( array(
			'id'      => $this->slug,
			'title'   => $this->struct['title'],
			'content' => $this->struct['content'],
		) );

	}
859785
public function render()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        parent::render();

        $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
        if (isset($soxId) && $soxId != self::NEW_SHOP_ID) {
            // load object
            $oShop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
            if (!$oShop->load($soxId)) {
                $soxId = $myConfig->getBaseShopId();
                $oShop->load($soxId);
            }
            $this->_aViewData['editshop'] = $oShop;
        }

        // default page number 1
        $this->_aViewData['default_edit'] = 'shop_main';
        $this->_aViewData['updatemain'] = $this->_blUpdateMain;

        $this->updateNavigation();

        if ($this->_aViewData['updatenav']) {
            //skipping requirements checking when reloading nav frame
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("navReload", true);
        }

        //making sure we really change shops on low level
        if ($soxId && $soxId != self::NEW_SHOP_ID) {
            $myConfig->setShopId($soxId);
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable('currentadminshop', $soxId);
        }

        return 'shop_list.tpl';
    }
507110
public function render()
    {
        Merchant::script($this->script());

        $options = $this->getOptions()->map(function ($option) {
            $selected = ($option == $this->perPage) ? 'selected' : '';
            $url = app('request')->fullUrlWithQuery([$this->perPageName => $option]);

            return "<option value=\"$url\" $selected>$option</option>";
        })->implode("\r\n");

        $show = trans('merchant.show');
        $entries = trans('merchant.entries');

        return <<<EOT

<label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">

        <small>$show</small>&nbsp;
        <select class="input-sm grid-per-pager" name="per-page">
            $options
        </select>
        &nbsp;<small>$entries</small>
    </label>

EOT;
    }
996607
def index
      respond_to do |format|
        format.html do
          render :index, locals: { authentications: current_user.services }
        end
      end
    end
278884
public function render()
    {
        if (is_callable($this->builder)) {
            call_user_func($this->builder, $this);
        }

        if ($this->fields->isEmpty()) {
            $this->all();
        }

        if (is_array($this->builder)) {
            $this->fields($this->builder);
        }

        $this->fields->each->setValue($this->model);
        $this->relations->each->setModel($this->model);

        $data = [
            'panel'     => $this->panel->fill($this->fields),
            'relations' => $this->relations,
        ];

        return view('admin::show', $data)->render();
    }
1189330
public function render(): void
	{
		$page = $this->paginator->page;
		if ($this->paginator->pageCount < 2) {
			$steps = [$page];
			$viewed = false;
		} else {
			$viewed = true;

			$f = $first = $page - $this->pageAround;
			$l = $last = $page + $this->pageAround;
			if ($f < $this->paginator->firstPage) {
				$last += ($this->paginator->firstPage - $f);
			}
			if ($l > $this->paginator->lastPage) {
				$first -= ($l - $this->paginator->lastPage);
			}
			$arr = range(max($this->paginator->firstPage, $first), min($this->paginator->lastPage, $last));

			if ($this->othersPage > 0) {
				$count = $this->othersPage * 2;
				$quotient = ($this->paginator->pageCount - 1) / $count;
				for ($i = 0; $i <= $count; $i++) {
					$arr[] = round($quotient * $i) + $this->paginator->firstPage;
				}
				sort($arr);
				$steps = array_values(array_unique($arr));
			} else {
				$steps = $arr;
			}
		}

		$this->template->viewed = $viewed;
		$this->template->steps = $steps;
		$this->template->paginator = $this->paginator;
		$this->template->isAjax = $this->isAjax;
		$this->template->noHistory = $this->noHistory;
		$this->template->prev = $this->prev;
		$this->template->next = $this->next;
		$this->template->other = $this->other;
		if (count($this->onClick ?? []) > 0) {
			$this->template->handle = 'click!';
		} else {
			$this->template->handle = 'this';
		}

		$this->template->setFile($this->templateFile);
		$this->template->render();
	}
124982
public function accountAction()
    {
        /** @var \VideoGamesRecords\CoreBundle\Entity\Player $player */
        $player = $this->getDoctrine()->getRepository('VideoGamesRecordsCoreBundle:Player')->find($this->getPlayer()->getIdPlayer());

        return $this->render(
            'VideoGamesRecordsTeamBundle:Team:account.html.twig',
            [
                'player' => $player,
            ]
        );
    }
602946
protected function connect()
    {
        if (!is_object(self::$instance)) {
            $func = $this->options['persistent'] ? 'pconnect' : 'connect';

            self::$instance = new \Redis();
            self::$instance->$func($this->options['host'], $this->options['port'], $this->options['timeout']);

            if ('' != $this->options['password']) {
                self::$instance->auth($this->options['password']);
            }
            if (0 != $this->options['select']) {
                self::$instance->select($this->options['select']);
            }
        }
    }
401631
public function renderPagetabEditionAction()
    {
		$idPage = $this->params()->fromRoute('idPage', $this->params()->fromQuery('idPage', ''));
    	$melisKey = $this->params()->fromRoute('melisKey', '');
    	
    	/**
         * Clearing the session data of the page in every open in page edition
         */
        $container = new Container('meliscms');
        if (!empty($container['content-pages']))
            if (!empty($container['content-pages'][$idPage]))
                $container['content-pages'][$idPage] = array();

        $melisCoreConf = $this->getServiceLocator()->get('MelisConfig');
        $resizeConfig   = $melisCoreConf->getItem('meliscms/conf')['pluginResizable'] ?? null;

    	$melisPage = $this->getServiceLocator()->get('MelisEnginePage');
    	$datasPage = $melisPage->getDatasPage($idPage, 'saved');
    	if($datasPage)
    	{
    	    $datasPageTree = $datasPage->getMelisPageTree();
         	$datasTemplate = $datasPage->getMelisTemplate();
    	}
    	
    	$this->loadPageContentPluginsInSession($idPage);  
    	
    	$view = new ViewModel();
    	$view->idPage = $idPage;
    	$view->melisKey = $melisKey;
    	$view->resizablePlugin = $resizeConfig;

    	if (empty($datasPageTree->page_tpl_id) || $datasPageTree->page_tpl_id == -1)
    	    $view->noTemplate = true;
    	else
    	    $view->noTemplate = false;
    	
    	if(!empty($datasTemplate))
            $view->namespace = $datasTemplate->tpl_zf2_website_folder;
    	else 
    	    $view->namespace = '';
    	
    	return $view;
    }
406275
public function render()
    {
        $paginationData = $this->paginator->getPages($this->scrollingStyle);
        $unorderedList  = $this->getElement()->spawnChild('ul');
        $previous       = $unorderedList->spawnChild('li');
        $previousAnchor = $previous->spawnChild('a')->setContent('&laquo;');

        $unorderedList->setAttributes($this->getListAttributes());
        $previous->setAttributes($this->getListItemAttributes());
        $previous->addAttributes($this->getPreviousAttributes());
        $previousAnchor->setAttributes($this->getAnchorAttributes());

        if (empty($paginationData->previous)) {
            $previous->addClass('disabled');
        } else {
            $previousAnchor->addAttribute('href', $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $paginationData->previous),
                    $this->getRouteParams()
                )
            ));
        }

        foreach ($paginationData->pagesInRange as $page) {
            $pageNumberElement = $unorderedList->spawnChild('li');
            $pageHref          = $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $page),
                    $this->getRouteParams()
                )
            );

            $pageNumberElement->setAttributes($this->getListItemAttributes());

            if ($page === $paginationData->current) {
                $pageNumberElement->addClass('active');
            }

            $anchorElement = $pageNumberElement->spawnChild('a')->addAttribute('href', $pageHref)->setContent($page);

            $anchorElement->addAttribute('data-page', $page);
        }

        $next       = $unorderedList->spawnChild('li');
        $nextAnchor = $next->spawnChild('a')->setContent('&raquo;');

        $next->setAttributes($this->getNextAttributes());

        if (empty($paginationData->next)) {
            $next->addClass('disabled');
        } else {
            $nextAnchor->addAttribute('href', $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $paginationData->next),
                    $this->getRouteParams()
                )
            ));
        }

        return $this->getElement()->render();
    }
846188
def attach_user            
      render :json => { :success => false, :errors => ['User is not logged in'] } and return if !logged_in?
      @order.customer_id = logged_in_user.id
      render :json => { :success => @order.save, :errors => @order.errors.full_messages, :logged_in => logged_in? }
    end
165756
public function render()
	{
		$paginator = $this->getPaginator();
		$page = $paginator->page;
		if ($paginator->pageCount < 2) {
			$steps = array($page);
		} else {
			$arr = range(max($paginator->firstPage, $page - 3), min($paginator->lastPage, $page + 3));
			if ($this->countBlocks) {
				$quotient = ($paginator->pageCount - 1) / $this->countBlocks;
				for ($i = 0; $i <= $this->countBlocks; $i++) {
					$arr[] = round($quotient * $i) + $paginator->firstPage;
				}
			}
			sort($arr);
			$steps = array_values(array_unique($arr));
		}

		$this->template->steps = $steps;
		$this->template->paginator = $paginator;
		$this->template->isAjax = $this->isAjax;
		$this->template->handle = 'showPage!';

		$this->template->setFile($this->getTemplateFile());
		$this->template->render();
	}