Attach getView function to the mustache view
544117
public function renderMustache($filename, $data) {
        // This is for mustache compatibility
        $data['getView'] = function($name, $data) { 
            return $this->getView($name, $data); 
            };
        return parent::renderMustache($filename, $data);
    }
971522
function(view) {
    if (view.options.layoutApplied) {
      return view;
    }

    // handle pre-layout middleware
    this.handle('preLayout', view);

    var opts = {};
    lazy.extend(opts, this.options);
    lazy.extend(opts, view.options);
    lazy.extend(opts, view.context());

    // get the layout stack
    var stack = {};
    var alias = this.viewTypes.layout;
    var len = alias.length, i = 0;

    while (len--) {
      var views = this.views[alias[i++]];
      for (var key in views) {
        var val = views[key];
        if (views.hasOwnProperty(key) && typeof val !== 'function' && val.path) {
          stack[key] = val;
        }
      }
    }

    // get the name of the first layout
    var name = view.layout;
    var str = view.content;
    var self = this;

    if (!name) return view;

    // Handle each layout before it's applied to a view
    function handleLayout(layoutObj) {
      view.currentLayout = layoutObj.layout;
      self.handle('onLayout', view);
      delete view.currentLayout;
    }

    // actually apply the layout
    var res = lazy.layouts(str, name, stack, opts, handleLayout);

    view.option('layoutStack', res.history);
    view.option('layoutApplied', true);
    view.content = res.result;

    // handle post-layout middleware
    this.handle('postLayout', view);
    return view;
  }
1223263
def findViewWithAttributeOrRaise(self, attr, val, root="ROOT"):
        '''
        
        '''

        view = self.findViewWithAttribute(attr, val, root)
        if view:
            return view
        else:
            raise ViewNotFoundException(attr, val, root)
1131757
protected function view(string $template, array $data = []) : string
    {
        if (!$this->mustacheInstance) {
            $viewsRoute = $this->config('paths.view');
            $options = ['extension' => '.hbs'];

            $this->mustacheInstance = new Mustache_Engine(array(
                'loader' => new Mustache_Loader_FilesystemLoader($viewsRoute, $options),
                'partials_loader' => new Mustache_Loader_FilesystemLoader($viewsRoute, $options),
                'charset' => 'UTF-8',
            ));
        }

        $tpl = $this->mustacheInstance->loadTemplate($template);
        $data = array_merge($this->getData(), $data);

        return $tpl->render($this->mapData($data));
    }
1133037
function (view) {
            return function () {
                if (
                    view === 'structure' && this.exists('.cms-toolbar-item-cms-mode-switcher .cms-btn-active') ||
                    view === 'content' && !this.exists('.cms-toolbar-item-cms-mode-switcher .cms-btn-active')
                ) {
                    return this.wait(100);
                }

                return this.waitForSelector('.cms-toolbar-expanded')
                    .then(function () {
                        return this.click('.cms-toolbar-item-cms-mode-switcher .cms-btn');
                    })
                    .then(function () {
                        if (view === 'structure') {
                            return this.waitForSelector('.cms-structure-content .cms-dragarea');
                        } else if (view === 'content') {
                            return this.waitWhileSelector('.cms-structure-mode-structure');
                        }

                        throw new Error(
                            'Invalid arguments passed to cms.switchTo, should be either "structure" or "content"'
                        );
                    });
            };
        }
78635
def view_get(method_name):
    

    def view_get(_value, context, **_params):
        method = getattr(context["view"], method_name)
        return _get(method, context["key"], (), {})

    return view_get
174103
function _viewFromEl($el) {
        if (!$el.hasClass("working-set-view")) {
            $el = $el.parents(".working-set-view");
        }

        var id = $el.attr("id").match(/working\-set\-list\-([\w]+[\w\d\-\.\:\_]*)/).pop();
        return _views[id];
    }
403694
def findViewWithAttributeThatMatches(self, attr, regex, root="ROOT"):
        '''
        
        '''

        return self.__findViewWithAttributeInTreeThatMatches(attr, regex, root)
1022751
function OutputView(outputData, outputTerminal) {
  this.outputData = outputData;
  this.outputTerminal = outputTerminal;

  this.url = util.createUrlLookup(module);

  // Elements attached to this by template().
  this.elems = {
    rowin: null,
    rowout: null,
    hide: null,
    show: null,
    duration: null,
    throb: null,
    prompt: null
  };

  var template = this.outputTerminal.template.cloneNode(true);
  domtemplate.template(template, this, this.outputTerminal.templateOptions);

  this.outputTerminal.element.appendChild(this.elems.rowin);
  this.outputTerminal.element.appendChild(this.elems.rowout);

  this.outputData.onClose.add(this.closed, this);
  this.outputData.onChange.add(this.changed, this);
}
1157173
function View(template) {
  this.context = null;
  if (!template) template = this;
  this.template = template;
  if (!this.template.bindings) this.template.bindings = [];
  this.bindings = this.template.bindings.map(mapBinding.bind(this), this);

  this.firstViewNode = this.firstChild;
  this.lastViewNode = this.lastChild;
  if (this.firstViewNode) {
    this.firstViewNode.view = this;
    this.lastViewNode.view = this;
  }
}
938280
function patchView (ExpressView, opts) {
    var proto = ExpressView.prototype;
    function View (name, options) {
        options = options || {};
        this.name = name;
        this.root = options.root;
        var engines = options.engines;
        this.defaultEngine = options.defaultEngine;
        var extensions = (typeof opts.extensions === 'function') ? opts.extensions() : opts.extensions;
        this.extensions = extensions;
        var ext = this.ext = extname(name, extensions);
        if (!ext && !this.defaultEngine) {
            throw Error('No default engine was specified and no extension was provided.');
        }
        if (!ext) {
            name += (ext = this.ext = (this.defaultEngine[0] !== '.' ? '.' : '') + this.defaultEngine);
        }
        this.engine = engines[ext] || (engines[ext] = require(ext.slice(1)).__express);
        this.path = this.lookup(name);
    }
    View.prototype = proto;

    function extname (name, extensions) {
        if (Array.isArray(extensions) && extensions.length > 0) {
            var ext;
            for (var i = 0, l = extensions.length; i < l; i += 1) {
                ext = extensions[i];
                if (typeof name === 'string' && name.indexOf(ext) !== -1) {
                    return ext;
                }
            }
        }
        return PATH.extname(name);
    }

    // replace original with new our own
    proto.lookup = createLookup(proto.lookup, opts);

    return View;
}
1192084
function(template, model, file) {
    var code = Mustache.render(template, model, templates)
      .replace(/[^\S\r\n]+$/gm, '');
    fs.writeFileSync(file, code, 'UTF-8');
    console.info('Wrote ' + file);
  }
908610
function embeddedViewEnd() {
    refreshView();
    isParent = false;
    previousOrParentNode = viewData[HOST_NODE];
    leaveView(viewData[PARENT]);
    ngDevMode && assertEqual(isParent, false, 'isParent');
    ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);
}
51644
function(id) {

		if (Lava.schema.DEBUG && !id) Lava.t();

		return Lava.view_manager.getViewById(id);

	}
1127944
function _apply (tmpl_name, tmpl_args){
	
	var ret = null;
	
	var tmpl = _get(tmpl_name);
	if( tmpl ){
	    ret = mustache.render(tmpl, tmpl_args);
	}
	// if( tmpl ){ console.log('rendered string length: ' + ret.length); }
	
	return ret;
    }
45981
function initViewerHTML() {
        // create viewer HTML
        $el.html(Crocodoc.viewerTemplate);
        if (config.useWindowAsViewport) {
            config.$viewport = $(window);
            $el.addClass(CSS_CLASS_WINDOW_AS_VIEWPORT);
        } else {
            config.$viewport = $el.find('.' + CSS_CLASS_VIEWPORT);
        }
        config.$doc = $el.find('.' + CSS_CLASS_DOC);
    }
1231901
function(id, src) {
                    return "can.Mustache(function(" + ARG_NAMES + ") { " + new Mustache({
                            text: src,
                            name: id
                        })
                        .template.out + " })";
                }