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
555766
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $html = $this->getHtmlSequence();

        if (! $this->trackData) {
            $html->h2($this->_('Unknown track'));
            $this->addMessage(sprintf($this->_('Unknown track id %s'), $this->trackId));
            return $html;
        }

        if ($this->showHeader) {
            $html->h2(sprintf($this->_('%s track'), $this->trackData['gtr_track_name']));
        }

        if (isset($this->trackData['gtr_date_until']) && $this->trackData['gtr_date_until']) {
            $html->pInfo(
                sprintf(
                    $this->_('This track can be assigned from %s until %s.'),
                    \MUtil_Date::format($this->trackData['gtr_date_start'], \Zend_Date::DATE_LONG),
                    \MUtil_Date::format($this->trackData['gtr_date_until'], \Zend_Date::DATE_LONG))
                );

        } else {
            $html->pInfo(
                sprintf(
                    $this->_('This track can be assigned since %s.'),
                    \MUtil_Date::format($this->trackData['gtr_date_start'], \Zend_Date::DATE_LONG))
                );
        }

        return $html;
    }
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.');
    }
707824
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $tabs = $this->getTabs();

        $tabCount = count($tabs);

        if ($tabs && ($this->displaySingleTab || $tabCount > 1)) {
            // Is there a better helper to include JS?
            $view->headScript()->appendFile($this->basepath->getBasePath()  .  '/gems/js/jquery.horizontalScrollMenu.js');

            $script = '(function($) {$(".'.$this->class.'").horizontalScrollMenu();}(jQuery));';

            $view->inlineScript()->appendScript($script);

            // Set the correct parameters
            $this->getCurrentTab();


            $scrollContainer = \MUtil_Html::create()->div();

            if ($tabCount > $this->scrollFromSize) {
                $scrollContainer->a('#', $this->prevLabel, array('class' => 'prev'));
            } else {
                $scrollContainer->span(array('class' => 'prev disabled'))
                        ->raw(str_repeat('&nbsp', strlen($this->prevLabel)));
            }

            $tabRow = $scrollContainer->div(array('class' => 'container'))->ul();

            foreach ($tabs as $tabId => $content) {
                $li = $tabRow->li(array('class' => $this->tabClass));

                if (strlen($content) > $this->tabLabelLength) {
                    $content = substr($content, 0, $this->tabLabelLength) . $this->tabLabelCutOffString;
                }

                $li->a($this->getParameterKeysFor($tabId) + $this->href, $content);

                if ($tabId == $this->currentTab) {
                    $li->appendAttrib('class', $this->tabActiveClass);
                }
            }

            if ($tabCount > $this->scrollFromSize) {
                $scrollContainer->a('#', $this->nextLabel, array('class' => 'next'));
            } else {
                $scrollContainer->span(array('class' => 'next disabled'))
                        ->raw(str_repeat('&nbsp', strlen($this->nextLabel)));
            }

            return $scrollContainer;
        } else {
            return null;
        }
    }
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();
    }
585206
protected function render($view)
    {
        $view = parent::render($view);
        if (!\Staq\Util::isStack($view, 'Stack\\View')) {
            $page = new \Stack\View;
            $page['content'] = $view;
            $view = $page;
        }
        return $view->render();
    }
866313
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        if ($this->roundId) {
            $htmlDiv   = \MUtil_Html::div();

            if ($this->showTitle) {
                $htmlDiv->h3(sprintf($this->_('%s round'), $this->trackEngine->getName()));
            }

            $table = parent::getHtmlOutput($view);
            $this->applyHtmlAttributes($table);

            // Make sure deactivated rounds are show as deleted
            foreach ($table->tbody() as $tr) {
                $skip = true;
                foreach ($tr as $td) {
                    if ($skip) {
                        $skip = false;
                    } else {
                        $td->appendAttrib('class', $table->getRepeater()->row_class);
                    }
                }
            }

            if ($this->showMenu) {
                $table->tfrow($this->getMenuList(), array('class' => 'centerAlign'));
            }

            $htmlDiv[] = $table;

            return $htmlDiv;

        } else {
            $this->addMessage($this->_('No round specified.'));
        }
    }
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;
    }
891883
protected function render($view)
    {
        $view = $this->getViewPath().$view.'.php';
        if (empty($this->attributes) === true) {
            $this->template->setAttributes(
                $this->attributes = $this->getAttributes()
            );
        }

        return $this->template->render($view);
    }
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;
        }
    }
138779
protected function generatePdf($view)
    {
        $view = $this->viewToString($view);
        $this->saveHtml($view);

        $command = implode(' ', [
            $this->getBinaryPath(),
            implode(' ', $this->commandLineOptions),
            $this->convertScript,
            $this->prefixHtmlPath($this->htmlPath),
            $this->pdfPath,
            implode(' ', $this->commandLineArguments),
        ]);

        $process = new Process($command, __DIR__);
        $process->setTimeout($this->timeout);
        $process->run();

        if ($errorOutput = $process->getErrorOutput()) {
            throw new RuntimeException('PhantomJS: ' . $errorOutput);
        }

        // Remove temporary html file
        @unlink($this->htmlPath);
    }
1139493
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $html = $this->getHtmlSequence();

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

        $user = $this->loader->getCurrentUser();
        $url[$this->request->getControllerKey()] = 'organization';
        $url[$this->request->getActionKey()]     = 'change-ui';

        if ($orgs = $user->getRespondentOrganizations()) {
            $html->pInfo($this->_('This organization cannot have any respondents, please choose one that does:'));

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

                $html->pInfo()->actionLink($url, $name)->appendAttrib('class', 'larger');
            }
        } else {
            $html->pInfo($this->_('This organization cannot have any respondents.'));
        }

        return $html;
    }
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');
    }
1305777
public function render($view)
    {
        if (!$this->context() && strpos($view, '/') !== false) {
            $this->context(dirname($view));
        }
        $content = $this->viewContent($this->type(), DIRECTORY_SEPARATOR . $view);
        if ($this->layout) {
            $ext = pathinfo($this->layout, PATHINFO_EXTENSION);
            $this->layout = ($ext === '') ? $this->layout.'.php' : $this->layout;
            $this->set('content', $content);
            $content = $this->viewContent(self::VIEW_TYPE_LAYOUT, $this->layout);
        }
        return $content;
    }
900576
public function render($view, array $vars = [])
    {
        if ($vars) {
            $this->vars = array_merge($this->vars, $vars);
        }

        $output = $this->includeView($view, $this->vars, $return_content = true);

        while ($this->block_stack) {
            $this->endBlock();
        }

        if (!$extend_view = $this->extend_view) {
            return $output;
        }

        $this->extend_view = null;

        return $this->render($extend_view);
    }
340409
public function renderResponse($view, $params = [])
    {
        /** @var \DevGroup\AdminUtils\controllers\BaseController $context */
        $context = $this instanceof Action ? $this->controller : $this;
        if (Yii::$app->request->isAjax === true) {
            Yii::$app->response->format = Response::FORMAT_JSON;

            $content = $context->renderAjax($view, $params);
            return new AjaxResponse($content, false, Yii::$app->session->getAllFlashes(true));
        } else {
            return $context->render($view, $params);
        }
    }
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);
        }
    }