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
187144
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $messages = false;

        if ($this->wasAnswered) {
            $this->currentToken = $this->token->getNextUnansweredToken();
        } else {
            $validator = $this->loader->getTracker()->getTokenValidator();

            if ($validator->isValid($this->token->getTokenId())) {
                $this->currentToken = $this->token;
            } else {
                $messages = $validator->getMessages();
                $this->currentToken = $this->token->getNextUnansweredToken();
            }
        }

        if ($this->currentToken instanceof \Gems_Tracker_Token) {
            $href = $this->getTokenHref($this->currentToken);
            $url  = $href->render($this->view);

            // Redirect at once
            header('Location: ' . $url);
            exit();
        }

        // After the header() so that the patient does not see the messages after answering surveys
        if ($messages) {
            $this->addMessage($messages);
        }

        $org  = $this->token->getOrganization();
        $html = $this->getHtmlSequence();

        $html->h3($this->_('Token'));
        $html->pInfo(sprintf($this->_('Thank you %s,'), $this->token->getRespondentName()));

        if ($welcome = $org->getWelcome()) {
            $html->pInfo()->raw(\MUtil_Markup::render($this->_($welcome), 'Bbcode', 'Html'));
        }

        $p = $html->pInfo()->spaced();
        if ($this->wasAnswered) {
            $p->append($this->_('Thanks for answering our questions.'));
        } elseif (! $this->token->isCurrentlyValid()) {
            if ($this->token->isExpired()) {
                $this->addMessage($this->_('This survey has expired. You can no longer answer it.'));
            } else {
                $this->addMessage($this->_('This survey is no longer valid.'));
            }
        }
        $p->append($this->_('We have no further questions for you at the moment.'));
        $p->append($this->_('We appreciate your cooperation very much.'));

        if ($sig = $org->getSignature()) {
            $html->pInfo()->raw(\MUtil_Markup::render($this->_($sig), 'Bbcode', 'Html'));
        }

        /*
        $html->br();

        $href = array($this->request->getActionKey() => 'index', \MUtil_Model::REQUEST_ID => null);
        $buttonDiv = $html->buttonDiv(array('class' => 'centerAlign'));
        $buttonDiv->actionLink($href, $this->_('OK'));
        // */

        return $html;
    }
699610
public function getHtmlOutput(\Zend_View_Abstract $view)
    {

        // If there is data, populate
        if (!empty($this->formData)) {
            $this->form->populate($this->formData);
        }

        if ($this->mailer->bounceCheck()) {
            $this->addMessage($this->_('On this test system all mail will be delivered to the from address.'));
        }

        $this->beforeDisplay();

        $htmlDiv = \MUtil_Html::div();

        $htmlDiv->h3($this->getTitle());

        $htmlDiv[] = $this->form;

        return $htmlDiv;
    }
613375
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $this->addMessage($this->_('Unsubscribing not possible'));

        $html = $this->getHtmlSequence();
        $html->h2($this->_('Unsubscribing not possible'));
        $p = $html->pInfo($this->_('To unsubscribe please contact the organization that subscribed you to this project.'));

        $menu = $this->menu->findAllowedController('contact');
        if ($menu) {
            $p->append(' ');
            $p->append($this->_('The participating organizations are on the contact page.'));

            $html->append($menu->toActionLink());
        }



        return $html;
    }
621082
public function createUiComponent(HtmlView $view) {
		if ($this->compact) {
			return $this->createCompactOutputUiComponent($view);
		}
		
		$targetRelationEntries = $this->toManyEiField->getValue();
		if (empty($targetRelationEntries)) return null;
		
		$targetEiuFrame = (new Eiu($this->targetEiFrame))->frame();
		
		$targetEiuEntries = array();
		foreach ($targetRelationEntries as $targetRelationEntry) {
			$targetEiEntry = null;
			if ($targetRelationEntry->hasEiEntry()) {
				$targetEiEntry = $targetRelationEntry->getEiEntry();
			} else {
				$targetEiEntry = $targetEiuFrame->entry($targetRelationEntry->getEiObject())->getEiEntry();
			}
			
			$targetEiuEntries[] = $targetEiuFrame->entry($targetEiEntry);
		}

		return $view->getImport('\rocket\impl\ei\component\prop\relation\view\embeddedOneToMany.html',
				array('eiuEntries' => $targetEiuEntries, 'reduced' => $this->reduced));
	}
1176116
public function generateView($view)
    {
        $generator = new ViewGenerator([
            'name' => $this->getPrefix('/').$this->getEntities().'/'.$view,
            'extends' => str_replace('/', '.', $this->getViewLayout()),
            'template' => '/scaffold/views/'.$view.'.stub',
            'force' => $this->console->option('force'),
        ]);

        $generator->appendReplacement(array_merge($this->getControllerScaffolder()->toArray(), [
            'lower_plural_entity' => strtolower($this->getEntities()),
            'studly_singular_entity' => Str::studly($this->getEntity()),
            'form' => $this->getFormGenerator()->render(),
            'table_heading' => $this->getTableDumper()->toHeading(),
            'table_body' => $this->getTableDumper()->toBody($this->getEntity()),
            'show_body' => $this->getTableDumper()->toRows($this->getEntity()),
        ]));

        $generator->run();

        $this->console->info('View created successfully.');
    }
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);
    }
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;
    }
1363517
static function render($view, array $data = []) {
        if (file_exists($view)) {
            if (is_array($data)) {
                foreach ($data as $_data => $_value) {
                    if (Config::get('security.anti_xss') && is_string($_value)) {
                        $_value = Text::entities($_value);
                    }
                    
                    $$_data = $_value;
                }
            } else {
                throw new \Lollipop\Exception\Runtime('Cannot define variable');
            }
        
            $file = new \SplFileInfo($view);
            $file_ext = strtolower($file->getExtension());
            
            
            ob_start();
            
            if ($file_ext == 'php' || $file_ext == 'phtml') {
                include($view);
            } else {
                readfile($view);
            }
            
            $output = ob_get_clean();
            
            return $output;
        }
        
        return false;
    }
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.'));
        }
    }
1312144
public function compile(JsUtils $js=NULL, &$view=NULL) {
		$this->content=array();
		if(isset($this->default)){
			$default=new HtmlOption("", $this->default);
			$this->content[]=$default;
		}
		foreach ($this->options as $option){
			$this->content[]=$option;
		}
		return parent::compile($js, $view);
	}
866251
public function render($view = null, $layout = null)
    {
        $content = parent::render($view, $layout);
        if ($this->response->type() == 'text/html') {
            return $content;
        }

        $this->Blocks->set('content', $this->output());
        $this->response->download($this->getFilename());

        return $this->Blocks->get('content');
    }
403860
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $seq = $this->getHtmlSequence();

        $seq->h2($this->_('Checks'));

        $ul = $seq->ul();
        $ul->li($this->_('Updates existing token description and order to the current round description and order.'));
        $ul->li($this->_('Updates the survey of unanswered tokens when the round survey was changed.'));
        $ul->li($this->_('Removes unanswered tokens when the round is no longer active.'));
        $ul->li($this->_('Creates new tokens for new rounds.'));
        $ul->li($this->_(
                'Checks the validity dates and times of unanswered tokens, using the current round settings.'
                ));

        $seq->pInfo($this->_(
                'Run this code when a track has changed or when the code has changed and the track must be adjusted.'
                ));
        $seq->pInfo($this->_(
                'If you do not run this code after changing a track, then the old tracks remain as they were and only newly created tracks will reflect the changes.'
                ));

        return $seq;
    }
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;
    }
588584
public function render($view, array $data = [])
    {
        // Get Body-Template
        $template = $this->getTemplate($view);

        // extend with default data
        $data += $this->data;

        // set tags
        foreach ($data as $name => $value) {
            $template->tag($name, $value);
        }

        // Render Page
        return $this->applyFunctions(get_maintemplate((string)$template));
    }
56057
public function renderViewElement(View $view): ?string
    {
        if (empty($this->viewElement)) {
            return null;
        }

        return call_user_func_array([$view, 'element'], $this->viewElement);
    }
645458
public function setView(\Zend_View_Interface $view = null) {
        /**
         * If the form is populated... and we have a tab set... select it
         */
        $tab = $this->getValue('tab');
        if ($tab > 0) {
            $this->selectTab($tab);
        }

        parent::setView($view);

        if ($this->_view !== $view) {
            $this->activateJQuery();
        }

        return $this;
    }
840207
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $table = parent::getHtmlOutput($view);
        $table->getOnEmpty()->class = 'centerAlign';

        if (($this->containingId || $this->keyboard) && (! self::$keyboardUsed)) {
            // Assign keyboard tracking only once
            self::$keyboardUsed = true;

            $this->applyHtmlAttributes($table);

            // If we are already in a containing div it is simple
            if ($this->containingId) {
                return array($table, new \Gems_JQuery_TableRowKeySelector($this->containingId));
            }

            // Create a new containing div
            $div = \MUtil_Html::create()->div(array('id' => 'keys_target', 'class' => 'table-container'), $table);

            return array($div, new \Gems_JQuery_TableRowKeySelector($div));

        } else {
            return $table;
        }
    }