gather together all script needing to be output

@param View $view
@param $view_var
@param $script_tags
@return string
976984
public function compile(&$view=NULL, $view_var='script_foot', $script_tags=TRUE) {
		$bs=$this->_bootstrap;
		if (isset($bs)&&isset($view)) {
			$bs->compileHtml($this, $view);
		}
		$sem=$this->_semantic;
		if (isset($sem)&&isset($view)) {
			$sem->compileHtml($this, $view);
		}
		return $this->js->_compile($view, $view_var, $script_tags);
	}
531141
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $table = parent::getHtmlOutput($view);

        $table->class = $this->class;
        $this->applyHtmlAttributes($table);
        $this->class = false;
        $tableContainer = \MUtil_Html::create()->div(array('class' => 'table-container'), $table);

        return $tableContainer;
    }
1294151
public function outputInput($value = null, $view = null)
    {
        $view = $view ? $view : $this->getView();

        return Cuztom::view('fields/'.$view, [
            'field' => $this,
            'value' => $value,
        ]);
    }
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;
    }
593454
public function load($view, $variables = [], $return = false)
    {
        $html = $this->getContents($view, $variables);

        if ($return === true) {
            return $html;
        }

        echo $html;

        return null;
    }
160131
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $div = \MUtil_Html::create('div');

        if ($this->surveyId && $this->data) {
            $div->h3(sprintf($this->_('Questions in survey %s'), $this->survey->getName()));
            $div->append(parent::getHtmlOutput($view));
        } else {
            $this->addMessage($this->_('Survey not found'));
            if ($this->surveyId) {
                $div->pInfo(sprintf($this->_('Survey %s does not exist.'), $this->surveyId));
            } else {
                $div->pInfo($this->_('Survey not specified.'));
            }
        }
        $item = $this->menu->getCurrentParent();
        if ($item) {
            $div->append($item->toActionLink($this->_('Cancel'), $this->request));
        }

        return $div;
    }
1040841
public function compose(View $view)
    {
        $tags = Tag::with('posts')
            ->whereHas('posts', function (Builder $b) {
                // TODO: Try to export this code with model's scope ?
                $b->where('is_draft', false)
                  ->where('published_at', '<=', Carbon::now());
            })
            ->get()
            ->sortByDesc(function($tag) {
                return $tag->posts->count();
            });

        $view->with('tagsWidgetItems', $tags);
    }
749544
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        if ($this->tokenId) {
            if ($this->token->exists) {
                $htmlDiv   = \MUtil_Html::div();

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

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

                return $htmlDiv;

            } else {
                $this->addMessage(sprintf($this->_('Token %s not found.'), $this->tokenId));
            }

        } else {
            $this->addMessage($this->_('No token specified.'));
        }
    }
417134
private function getResponse(View $view)
    {
        return $this->templateEngine->renderResponse($this->template, $view->getParams());
    }
876874
protected function _setViewParams( MW_View_Interface $view, array &$tags = array(), &$expire = null )
	{
		if( !isset( $this->_cache ) )
		{
			$attrMap = array();
			$manager = MShop_Factory::createManager( $this->_getContext(), 'attribute' );

			$search = $manager->createSearch( true );
			$expr = array(
				$search->compare( '==', 'attribute.domain', 'product' ),
				$search->getConditions(),
			);
			$search->setConditions( $search->combine( '&&', $expr ) );

			$sort = array(
				$search->sort( '+', 'attribute.type.code' ),
				$search->sort( '+', 'attribute.position' ),
			);
			$search->setSortations( $sort );
			$search->setSlice( 0, 1000 );

			/** @todo Make referenced domains configurable */
			$attributes = $manager->searchItems( $search, array( 'text', 'media' ) );

			foreach( $attributes as $id => $item ) {
				$attrMap[ $item->getType() ][$id] = $item;
			}

			$this->_addMetaItem( $attributes, 'attribute', $this->_expire, $this->_tags );
			$this->_addMetaList( array_keys( $attributes ), 'attribute', $this->_expire );

			// Delete cache when attributes are added or deleted even in "tag-all" mode
			$this->_tags[] = 'attribute';


			$view->attributeMap = $attrMap;

			$this->_cache = $view;
		}

		$expire = $this->_expires( $this->_expire, $expire );
		$tags = array_merge( $tags, $this->_tags );

		return $this->_cache;
	}
343754
public static function registerSelect($view)
    {
        $script = <<<JavaScript
(function (s2helper, $, undefined) {
    "use strict";
    s2helper.formatResult = function (result, container, query, escapeMarkup, depth) {
        if (typeof depth == 'undefined') {
            depth = 0;
        }
        var markup = [];
        window.Select2.util.markMatch(result._label, query.term, markup, escapeMarkup);
        return markup.join("");
    };

    s2helper.formatSelection = function (item) {
        return item._label;
    };

    // generates query params
    s2helper.data = function (term, page) {
        return { search: term, page: page };
    };

    // builds query results from ajax response
    s2helper.results = function (data, page) {
        return { results: data.items, more: page < data._meta.pageCount };
    };

    s2helper.getParams = function (element) {
        var primaryKey = element.data('relation-pk');
        if (typeof primaryKey === 'undefined' || primaryKey === null) {
            primaryKey = 'id';
        }

        var params = {search: {}};
        params.search[primaryKey] = element.val();
        return params;
    };

    s2helper.initSingle = function (element, callback) {
        $.getJSON(element.data('select2').opts.ajax.url, s2helper.getParams(element), function (data) {
            if (typeof data.items[0] != 'undefined') {
                callback(data.items[0]);
            }
        });
    };

    s2helper.initMulti = function (element, callback) {
        $.getJSON(element.data('select2').opts.ajax.url, s2helper.getParams(element), function (data) {callback(data.items);});
    };
}( window.s2helper = window.s2helper || {}, jQuery ));
JavaScript;
        $view->registerJs($script, \yii\web\View::POS_END, 'netis.s2helper');
        \maddoger\widgets\Select2BootstrapAsset::register($view);
    }
764597
public static function view(string $view, array $data = [])
  {
    $global = Self::$variables::get();
    $data = array_merge($global, $data);

    return Self::$view->view($view, $data);
  }
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);
        }
    }
261287
public function getHtmlOutput(\Zend_View_Abstract $view)
    {
        $this->html = $this->getHtmlSequence();

        $versions = $this->loader->getVersions();
        $this->html->h2(sprintf(
                'Upgrade compatibility report for GemsTracker %s, build %d',
                $versions->getGemsVersion(),
                $versions->getBuild()
                ));

        $this->addEscortReport();

        $this->addProjectIniReport();

        $this->addFileReports();

        return $this->html;
    }
872646
protected function registerScripts(\yii\web\View $view){
        if ($this->clientOptions !== false) {
            $options = empty($this->clientOptions) ? '' : Json::encode($this->clientOptions);
            $js = "jQuery('#{$this->id}').fancybox($options);";
            $view->registerJs($js , View::POS_READY);
        }
    }
366710
protected function mergeVariables(string $view, array $variables): array
	{
		return $variables + $this->getAutoAssignVariables($view) + $this->globalVariables;
	}
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;
    }