Injects the used view type into the content view template.
351528
public function onPreContentView(PreContentViewEvent $event): void
    {
        $currentRequest = $this->requestStack->getCurrentRequest();
        if (!$currentRequest instanceof Request) {
            return;
        }

        $viewType = $currentRequest->attributes->get('viewType');

        $event->getContentView()->addParameters(
            [
                'view_type' => !empty($viewType) ? $viewType : '',
            ]
        );
    }
1023210
public void attachView(View view) {
		if (view == null) {
			throw new IllegalArgumentException("Mvp view must be not null");
		}

		boolean isViewAdded = mViews.add(view);

		if (!isViewAdded) {
			return;
		}

		mInRestoreState.add(view);

		Set<ViewCommand<View>> currentState = mViewStates.get(view);
		currentState = currentState == null ? Collections.<ViewCommand<View>>emptySet() : currentState;

		restoreState(view, currentState);

		mViewStates.remove(view);

		mInRestoreState.remove(view);
	}
1095722
function setupViewPartials() {
  
  // Set view path association object
  this.views.pathAsoc = {};

  // Partial & template regexes
  var self = this;
  var exts = this.templateExtensions;
  var partialRegex = new RegExp('\/views\/(.+)\/partials\/[a-zA-Z0-9-_]+\\.(' + exts.join('|') + ')$');
  var templateRegex = new RegExp('\\.(' + exts.join('|') + ')$');
  var layoutPath = this.mvcpath + 'views/' + this.paths.layout;

  var viewsPath = this.mvcpath + 'views';
  
  var partialPaths = [];
  
  if (fs.existsSync(viewsPath)) {
    
    fileModule.walkSync(viewsPath, function(dirPath, dirs, files) {
      
      for (var path,file,i=0; i < files.length; i++) {

        file = files[i];
        path = dirPath + "/" + file;

        if (partialRegex.test(path)) {

          // Only build valid partial views
          partialPaths.push(path);
          buildPartialView.call(self, path);
          watchPartial.call(self, path, buildPartialView);

        } else if (templateRegex.test(file)) {

          // Build partial views for everything inside app.paths.layout

          if (path.indexOf(layoutPath) === 0) {
            partialPaths.push(path);
            buildPartialView.call(self, path);
            watchPartial.call(self, path, buildPartialView);
          }

          // Only add valid templates to view associations
          self.views.pathAsoc[self.relPath(path.replace(self.regex.templateFile, ''))] = path;

        }
      }
    });
    
  }
  
  // Add Builtin Partials
  
  var Helper = protos.lib.helper;
  var builtinHelper = new Helper();
  
  for (var m in builtinHelper) {
    if (builtinHelper[m] instanceof Function) {
      this.registerViewHelper(m, builtinHelper[m], builtinHelper);
    }
  }
  
  // Helper Partials
  
  Object.keys(this.helpers).forEach(function(alias) {
    var m, method, hkey, helper = self.helpers[alias];
    for (m in helper) {
      if (helper[m] instanceof Function) {
        method = helper[m];
        hkey = (alias == 'main')
          ? util.format('%s', m)
          : util.format('%s_%s', alias, m);
        self.registerViewHelper(hkey, method, helper);
      }
    }
  });
  
  // Event when view partials are loaded

  this.emit('view_partials_loaded', this.views.partials);
  
  // Set shortcode context
  // NOTE: Automatically resets on hot code loading, so it's good.
  
  var shortcodeContext = this.__shortcodeContext = {};
  
  // Only add shortcode filter to context if enabled on config
  
  if (this.config.shortcodeFilter) {
    
    // Register shortcodes from partials
  
    var shortcode = self.shortcode;
    var partials = self.views.partials;
  
    Object.keys(this.views.partials).forEach(function(partial) {
      if (partial[0] === '$') {
        shortcodeContext[partial.replace(/^\$/, '#')] = self.views.partials[partial];
      } else {
        shortcodeContext[partial] = function(buf, params, locals) {
          if (buf) params.content = buf; // Provide wrapped content in params.content
          params.__proto__ = locals; // Set locals as prototype of params
          return partials[partial].call(null, params); // Provide params to partial, which is passed as locals
        }
      }
    });

    this.addFilter('context', function(buf, locals) {
      buf = this.shortcode.parse(buf, locals, shortcodeContext);
      return buf;
    });
    
  }
  
  // Event when view shortcodes are loaded

  this.emit('view_shortcodes_loaded', shortcodeContext);

}
439952
private void inflateContentView() {
        contentContainer = rootView.findViewById(R.id.content_container);
        contentContainer.removeAllViews();

        if (customView != null) {
            contentContainer.setVisibility(View.VISIBLE);
            contentContainer.addView(customView);
        } else if (customViewId != -1) {
            contentContainer.setVisibility(View.VISIBLE);
            LayoutInflater layoutInflater = LayoutInflater.from(getContext());
            View view = layoutInflater.inflate(customViewId, contentContainer, false);
            contentContainer.addView(view);
        } else {
            LayoutInflater layoutInflater = LayoutInflater.from(getContext());
            View view = layoutInflater
                    .inflate(R.layout.bottom_sheet_grid_view, contentContainer, false);
            contentContainer.addView(view);
        }

        showGridView();
    }
763948
@Override
    public View generateView(Context ctx, ViewGroup parent) {
        ViewHolder viewHolder = getViewHolder(LayoutInflater.from(ctx).inflate(getLayoutRes(), parent, false));

        //as we already know the type of our ViewHolder cast it to our type
        bindView(viewHolder, Collections.EMPTY_LIST);
        //return the bound and generatedView
        return viewHolder.itemView;
    }
199097
@Nullable static View getView(Context context, int resourceId, View view) {
    LayoutInflater inflater = LayoutInflater.from(context);
    if (view != null) {
      return view;
    }
    if (resourceId != INVALID) {
      view = inflater.inflate(resourceId, null);
    }
    return view;
  }
39309
function UMLCollaborationView() {
        UMLGeneralNodeView.apply(this, arguments);

        /** @member {UMLTemplateParameterCompartmentView} */
        this.templateParameterCompartment = new UMLTemplateParameterCompartmentView();
        this.templateParameterCompartment.selectable = Core.SK_PROPAGATE;
        this.templateParameterCompartment.parentStyle = true;
        this.addSubView(this.templateParameterCompartment);

        this.fillColor = PreferenceManager.get("uml.collaboration.fillColor", "#ffffff") || PreferenceManager.get("view.fillColor", "#ffffff");
    }
148842
public void registerView(final ServiceValidationViewTypes type, final Pair<View, View> view) {
        registerView(type.getType(), view);
    }
1230337
@NonNull protected CV createContentView(View view) {
    return (CV) view.findViewById(R.id.contentView);
  }
145645
public void setContentView(View view) {
        ensureContent();
        if (view == null) {
            throw new IllegalArgumentException("Content view can't be null");
        }
        if (mContentContainer instanceof ViewGroup) {
            ViewGroup contentContainer = (ViewGroup) mContentContainer;
            if (mContentView == null) {
                contentContainer.addView(view);
            } else {
                int index = contentContainer.indexOfChild(mContentView);
                // replace content view
                contentContainer.removeView(mContentView);
                contentContainer.addView(view, index);
            }
            mContentView = view;
        } else {
            throw new IllegalStateException("Can't be used with a custom content view");
        }
    }
1275515
public View viewByContentType(String contentType) {
        for (View view: views.values()) {
            if (view.getContentType().equals(contentType)) {
                return view;
            }
        }
        return null;
    }
525107
function(node, viewFactory) {
  NodeView.call(this, node, viewFactory);

  this.$el.attr({id: node.id});
  this.$el.addClass("content-node cover");
}
748019
@Nullable
    public static String setVariantForView(@NonNull View view, @NonNull AttributeSet attrs) {
        String previousVariant;
        final TypedArray styledAttributes = view.getContext().getTheme()
                .obtainStyledAttributes(attrs, R.styleable.View, 0, 0);
        try {
            previousVariant = setVariantForView(view, styledAttributes
                    .getString(R.styleable.View_variant));
        } finally {
            styledAttributes.recycle();
        }

        return previousVariant;
    }
782456
protected function registerViewBindings()
    {
        $this->singleton('view', function ()
        {
            $this->configure('view');

            $this['config']['view.paths'] = [
                realpath(base_path('views')),
            ];
            
            return $this->loadComponent('view', 'Illuminate\View\ViewServiceProvider');
        });
    }
542130
protected void initTemplates(Element root, CmsXmlContentDefinition contentDefinition) {

        String strEnabledByDefault = root.attributeValue(ATTR_ENABLED_BY_DEFAULT);
        m_allowedTemplates.setDefaultMembership(safeParseBoolean(strEnabledByDefault, true));
        List<Node> elements = root.selectNodes(APPINFO_TEMPLATE);
        for (Node elem : elements) {
            boolean enabled = safeParseBoolean(((Element)elem).attributeValue(ATTR_ENABLED), true);
            String templateName = elem.getText().trim();
            m_allowedTemplates.setContains(templateName, enabled);
        }
        m_allowedTemplates.freeze();
    }
546097
function() {

		if (this._content == null) {

			var argument_value = this._argument.getValue();
			if (Lava.schema.DEBUG && argument_value && !Array.isArray(argument_value)) Lava.t("Include view expects to receive a template from it's argument");

			this._content = new Lava.system.Template(
				this._argument.getValue() || this._config.template || [],
				this._widget,
				this
			)

		}

		return this._content;

	}
1180125
function () {
                // Ensure we've got a proper binding context to work with
                var bindingContext = (dataOrBindingContext && (dataOrBindingContext instanceof bindingContextConstructor))
                    ? dataOrBindingContext
                    : new bindingContextConstructor(dataOrBindingContext, null, null, null, { "exportDependencies": true });

                var templateName = resolveTemplateName(template, bindingContext['$data'], bindingContext),
                    renderedNodesArray = executeTemplate(targetNodeOrNodeArray, renderMode, templateName, bindingContext, options);

                if (renderMode == "replaceNode") {
                    targetNodeOrNodeArray = renderedNodesArray;
                    firstTargetNode = getFirstNodeFromPossibleArray(targetNodeOrNodeArray);
                }
            }