Create the snippets content

This is a stub function either override getHtmlOutput() or override render()

@param \Zend_View_Abstract $view Just in case it is needed here
@return \MUtil_Html_HtmlInterface Something that can be rendered
425709
public function getHtmlOutput(\Zend_View_Abstract $view)
    {

        if ($this->tokenId) {
            if ($this->token->exists) {
                return parent::getHtmlOutput($view);
            } else {
                $this->addMessage(sprintf($this->_('Token %s not found.'), $this->tokenId));
            }

        } else {
            $this->addMessage($this->_('No token specified.'));
        }
    }
1160171
public function renderInput($view)
    {
        // First check if there isn't a model view.

        $viewName = 'ignicms::admin.formElements.'.$view;

        if ($this->model instanceof AdminModel && $identifier = $this->model->getIdentifier()) {
            // First check if there is a rewrite on specific field type
            $field = str_slug($this->field);
            if (\View::exists('resources.'.$identifier.'.formElements.'.$field)) {
                $viewName = 'resources.'.$identifier.'.formElements.'.$field;
            } elseif (\View::exists('resources.'.$identifier.'.formElements.'.$view)) {
                $viewName = 'resources.'.$identifier.'.formElements.'.$view;
            }
        }

        return view($viewName, [
            'record' => $this->model,
            'fieldName' => $this->field,
            'elementName' => $this->elementName,
            'options' => $this->options,
            'sourceModel' => $this->sourceModel,
        ]);
    }
911243
public function compile(JsUtils $js=NULL,&$view=NULL){
		$max=$this->_max;
		if(!$this->_compiled){
			foreach ($this->content as $item){
				$item->addClass("pageNum");
			}
			$this->insertItem(new HtmlIcon("", "left chevron"))->setProperty("data-page", \max([1,$this->_page-1]))->addToProperty("class","_firstPage no-active");
			$this->addItem(new HtmlIcon("", "right chevron"))->setProperty("data-page", \min([$max,$this->_page+1]))->setProperty("data-max", $max)->addToProperty("class","_lastPage no-active");
			$this->asPagination();
		}
		return parent::compile($js,$view);
	}
732064
public function render(\Zend_View_Abstract $view)
    {
        $html = '';
        $glue = $this->getGlue();

        foreach ($this->getIterator() as $key => $item) {
            $html .= $glue;

            if ($item instanceof \Gems_Menu_SubMenuItem) {
                $item = $this->toActionLink($key);
            }

            $html .= \MUtil_Html::renderAny($view, $item);
        }

        return substr($html, strlen($glue));
    }
1229694
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $htmlDiv = \MUtil_Html::create()->div(array('class' => 'answer-container'));

        if ($this->tokenId) {
            if ($this->token->exists) {
                if ($this->showHeaders) {
                    $this->addHeaderInfo($htmlDiv);
                }

                $table = parent::getHtmlOutput($view);
                $table->setPivot(true, 2, 1);

                $this->applyHtmlAttributes($table);
                $this->class = false;
                $htmlDiv[] = $table;

            } else {
                $htmlDiv->ul(sprintf($this->_('Token %s not found.'), $this->tokenId), array('class' => 'errors'));
            }

        } else {
            $htmlDiv->ul($this->_('No token specified.'), array('class' => 'errors'));
        }

        if ($this->showButtons) {
            $this->addButtons($htmlDiv);
        }
        return $htmlDiv;
    }
1082885
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $menuList = $this->menu->getMenuList();

        $menuList->addParameterSources($this->request, $this->menu->getParameterSource());

        // \MUtil_Echo::track($this->request->getParams(), $this->menu->getParameterSource()->getArrayCopy());

        $this->addButtons($menuList);

        if ($menuList->render($view)) {
            return \MUtil_Html::create('div', array('class' => 'buttons', 'renderClosingTag' => true), $menuList);
        }
    }
46989
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        if ($this->sortParamAsc) {
            $this->dateSelector->getModel()->setSortParamAsc($this->sortParamAsc);
        }
        if ($this->sortParamDesc) {
            $this->dateSelector->getModel()->setSortParamDesc($this->sortParamDesc);
        }

        $model = $this->dateSelector->getModel();
        $filter = $model->getFilter();

        // Unset sorts from the filter
        unset($filter[$model->getSortParamAsc()]);
        unset($filter[$model->getSortParamDesc()]);

        // Unset items and page (from paginator)
        unset($filter['page']);
        unset($filter['items']);

        $model->setFilter($filter);

        return $this->dateSelector->getTable($this->searchData);
    }
631302
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $html = $this->getHtmlSequence();

        $html->h3($this->_('Choose an organization'));

        $url[$this->request->getControllerKey()] = $this->request->getControllerName();
        $url[$this->request->getActionKey()]     = $this->action;

        if ($this->info) {
            $html->pInfo($this->info);
        }

        foreach ($this->orgs as $orgId => $name) {
            $url['org'] = $orgId;

            $html->pInfo()->actionLink($url, $name)->appendAttrib('class', 'larger');
        }

        return $html;
    }
12275
protected function minify(string $view): string
    {
        $html = $this->compile($view);

        if ($this->minify)
        {
            $html = \Minify_HTML::minify(\trim($html), [
                'cssMinifier' => [\Minify_CSSmin::class, 'minify'],
                'jsMinifier'  => [JSMin::class, 'minify'],
            ]);
        }

        if (!empty($this->extends))
        {
            $html = (new HTML($html, $this->extends))
                ->apply();
        }

        return $html;
    }
825076
public function getOutputFromView($view, array $parameters = array(),
        array $options = array())
    {
        $this->log(sprintf('Get converted output from view (%s).', $view));

        $html = $this->getTemplatingEngine()->render($view, $parameters);

        return $this->getOutputFromHtml($html, $options);
    }
124862
public function render(string $view): string
	{
		if(empty($this->viewFactory))
		{
			throw new RuntimeException('A [ ViewFactory ] instance is required to render pagination views.');
		}

		return $this->viewFactory->create($view, $this->pagination())->render();
	}
792323
public function render($view = null, $data = array())
    {
        if (is_null($view)) {
            $view = static::$defaultView;
        }

        $data = array_merge($data, array(
            'paginator' => $this,
            'elements'  => $this->elements(),
        ));

        return new HtmlString(
            static::viewFactory()->make($view, $data)->render()
        );
    }
56057
public function renderViewElement(View $view): ?string
    {
        if (empty($this->viewElement)) {
            return null;
        }

        return call_user_func_array([$view, 'element'], $this->viewElement);
    }
1276721
public function render(string $view, array $params = []): string
    {
        return $this->make($view, $params)->render();
    }
51008
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $html    = $this->getHtmlSequence();
        $org     = $this->token->getOrganization();
        $tracker = $this->loader->getTracker();

        $html->h3($this->_('Token'));
        if ($this->token->hasRelation()) {
            $p = $html->pInfo(sprintf($this->_('Welcome %s,'), $this->token->getRelation()->getName()));    
            
            $html->pInfo(sprintf($this->_('We kindly ask you to answer a survey about %s.'), $this->token->getRespondent()->getName()));            
        } else {
            $p = $html->pInfo(sprintf($this->_('Welcome %s,'), $this->token->getRespondentName()));    
        }
        $p->br();
        $p->br();

        if ($this->wasAnswered) {
            $html->pInfo(sprintf($this->_('Thank you for answering the "%s" survey.'), $this->token->getSurveyName()));
            // $html->pInfo($this->_('Please click the button below to answer the next survey.'));
        } else {
            if ($welcome = $org->getWelcome()) {
                $html->pInfo()->raw(\MUtil_Markup::render($this->_($welcome), 'Bbcode', 'Html'));
            }
            // $html->pInfo(sprintf($this->_('Please click the button below to answer the survey for token %s.'), strtoupper($this->token->getTokenId())));
        }

        // Only valid or answerd in the last
        $where = "(gto_completion_time IS NULL AND gto_valid_from <= CURRENT_TIMESTAMP AND (gto_valid_until IS NULL OR gto_valid_until >= CURRENT_TIMESTAMP))";

        // Do we always look back
        if ($this->lookbackInHours) {
            $where .= $this->db->quoteInto("OR DATE_ADD(gto_completion_time, INTERVAL ? HOUR) >= CURRENT_TIMESTAMP", $this->lookbackInHours, \Zend_Db::INT_TYPE);
        }

        // We always look back from the entered token
        if ($this->token->isCompleted()) {
            $filterTime = $this->token->getCompletionTime();
            $filterTime->subHour(1);
            $where .= $this->db->quoteInto(" OR gto_completion_time >= ?", $filterTime->toString('yyyy-MM-dd HH:mm:ss'));
        }

        // Get the tokens
        $tokens = $this->token->getAllUnansweredTokens($where);

        if ($tokens) {
            $currentToken = $this->token->isCompleted() ? false : $this->token->getTokenId();
            $lastRound    = false;
            $lastTrack    = false;
            $open         = 0;
            $pStart       = $html->pInfo();

            foreach ($tokens as $row) {
                if ($row['gtr_track_name'] !== $lastTrack) {
                    $lastTrack = $row['gtr_track_name'];

                    $div = $html->div();
                    $div->class = 'askTrack';
                    $div->append($this->_('Track'));
                    $div->append(' ');
                    $div->strong($row['gtr_track_name']);
                    if ($row['gr2t_track_info']) {
                        $div->small(sprintf($this->_(' (%s)'), $row['gr2t_track_info']));
                    }
                }

                if ($row['gto_round_description'] && ($row['gto_round_description'] !== $lastRound)) {
                    $lastRound = $row['gto_round_description'];
                    $div = $html->div();
                    $div->class = 'askRound';
                    $div->strong(sprintf($this->_('Round: %s'), $row['gto_round_description']));
                    $div->br();
                }
                $token = $tracker->getToken($row);

                $div = $html->div();
                $div->class = 'askSurvey';
                if ($token->isCompleted()) {
                    $div->actionDisabled($token->getSurveyName());
                    $div->append(' ');
                    $div->append($this->formatCompletion($token->getCompletionTime()));

                } else {
                    $open++;

                    $a = $div->actionLink($this->getTokenHref($token), $token->getSurveyName());
                    $div->append(' ');
                    $div->append($this->formatDuration($token->getSurvey()->getDuration()));
                    $div->append($this->formatUntil($token->getValidUntil()));

                    /*
                    if (false === $currentToken) {
                        $currentToken = $token->getTokenId();
                    }
                    if ($token->getTokenId() == $currentToken) {
                        $a->appendAttrib('class', 'currentRow');
                    } // */
                }
            }
            if ($open) {
                $pStart->append($this->plural('Please answer the open survey.', 'Please answer the open surveys.', $open));
            } else {
                $html->pInfo($this->_('Thank you for answering all open surveys.'));
            }
        } else {
            $html->pInfo($this->_('There are no surveys to show for this token.'));
        }

        if ($sig = $org->getSignature()) {
            $p = $html->pInfo();
            $p->br();
            $p->raw(\MUtil_Markup::render($this->_($sig), 'Bbcode', 'Html'));
        }
        return $html;
    }
413653
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $output = parent::getHtmlOutput($view);
        if ($this->result) {
            $output->h3($this->_('Result sets'));
            $output[] = $this->getResultTable($this->result);
        }
        return $output;
    }
1081746
public function render($view = null, $layout = null)
    {
        $view = $this->_getFormView($view);
        return parent::render($view, $layout);
    }