Finds the View with the specified tag or raise a ViewNotFoundException
767289
def findViewByTagOrRaise(self, tag, root="ROOT"):
        '''
        
        '''

        view = self.findViewWithAttribute('getTag()', tag, root)
        if view:
            return view
        else:
            raise ViewNotFoundException("tag", tag, root)
1068653
def handle_starttag(self, tagName, attributeList, isSelfClosing=False):
        '''
            
        '''
        newTag = AdvancedHTMLParser.handle_starttag(self, tagName, attributeList, isSelfClosing)
        self._indexTag(newTag)

        return newTag
947468
private int getViewID() {
        if (viewID < 0) {
            String sql = "SELECT view_id FROM views WHERE name=?";
            String[] args = {name};
            Cursor cursor = null;
            try {
                cursor = store.getStorageEngine().rawQuery(sql, args);
                if (cursor.moveToNext()) {
                    viewID = cursor.getInt(0);
                }
            } catch (SQLException e) {
                Log.e(Log.TAG_VIEW, "Error getting view id", e);
            } finally {
                if (cursor != null) {
                    cursor.close();
                }
            }
        }
        return viewID;
    }
1085641
public View onViewCreated(View view, Context context, AttributeSet attrs) {
        if (view != null && view.getTag(R.id.calligraphy_tag_id) != Boolean.TRUE) {
            onViewCreatedInternal(view, context, attrs);
            view.setTag(R.id.calligraphy_tag_id, Boolean.TRUE);
        }
        return view;
    }
1296749
public CmsElementViewInfo getView(String value) {

        for (CmsElementViewInfo info : m_data.getElementViews()) {
            if (info.getElementViewId().toString().equals(value)) {
                return info;
            }
        }
        return null;
    }
484698
function findView(app, name) {
    var keys = app.viewTypes.renderable;
    var len = keys.length;
    var i = -1;

    var res = null;
    while (++i < len) {
      res = app.find(name, keys[i]);
      if (res) {
        break;
      }
    }
    return res;
  }
664372
def find_by_id(self, tag, params={}, **options): 
        
        path = "/tags/%s" % (tag)
        return self.client.get(path, params, **options)
262605
def has_tag? tag
      selected.each do |view|
        return true if view.rmq_data.has_tag?(tag)
      end
      false # tag doesn't exist if we got here
    end
508332
function getViewParams(url, view) {
  let match = view.regex.exec(url);
  if (match) {
    match.shift();
    return zip(view.params, match);
  } else {
    return null;
  }
}
753263
def render_view(parser, token):
    
    bits = token.split_contents()

    n = len(bits)
    if n < 2:
        raise TemplateSyntaxError("'%s' takes at least one view as argument")

    viewname = bits[1]

    kwargs = {}
    if n > 2:
        for bit in bits[2:]:
            match = kwarg_re.match(bit)
            if not match:
                raise TemplateSyntaxError("Malformed arguments to render_view tag")
            name, value = match.groups()
            if name:
                kwargs[name] = parser.compile_filter(value)

    return StringNode(viewname, kwargs)
1350406
public function findView($view)
    {
        $file = $this->basePath("app/View/$view.php");
        if($this->findFile($file)) {
            return $file;
        }
        else {
            throw new Exception($file." View file is missing.");
            exit;
        }
    }
1301036
protected function _findVariableInContext($tag_name, $context) {
		foreach ($context as $view) {
			if (is_object($view)) {
				if (method_exists($view, $tag_name)) {
					return $view->$tag_name();
				} else if (isset($view->$tag_name)) {
					return $view->$tag_name;
				}
			} else if (is_array($view) && array_key_exists($tag_name, $view)) {
				return $view[$tag_name];
			}
		}

		if ($this->_throwsException(MustacheException::UNKNOWN_VARIABLE)) {
			throw new MustacheException("Unknown variable: " . $tag_name, MustacheException::UNKNOWN_VARIABLE);
		} else {
			return '';
		}
	}
1336627
function(view_config, raw_tag) {

		var x = raw_tag.x;

		if (x) {

			if (Lava.schema.DEBUG) this._assertControlAttributesValid(x);
			if ('options' in x) {

				if (typeof(x.options) != 'object') Lava.t("Malformed x:options");
				view_config.options = x.options;

			}
			if ('label' in x) this.setViewConfigLabel(view_config, x.label);
			if ('roles' in x) view_config.roles = this.parseTargets(x.roles);

		}

		if (('attributes' in raw_tag) && ('id' in raw_tag.attributes)) this.setViewConfigId(view_config, raw_tag.attributes.id);

	}
1209063
def find_package_by_tag(tag)
      if tag.has_ref?
        find_package(tag.repo, tag.ref)
      else
        find_package(tag.repo)
      end
    end
51644
function(id) {

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

		return Lava.view_manager.getViewById(id);

	}
1098155
protected View getView(String viewName) {
        for (View view: solo.getCurrentViews()) {
            if (view.toString().contains(viewName)) {
                return view;
            }
        }

        return null;
    }
1020425
public int renderTags(String tagPath) throws Exception {
        int renderedCount = 0;
        final List<Throwable> errors = new LinkedList<>();

        for (String tag : db.getAllTags()) {
            try {
                Map<String, Object> model = new HashMap<>();
                model.put("renderer", renderingEngine);
                model.put(Attributes.TAG, tag);
                Map<String, Object> map = buildSimpleModel(Attributes.TAG);
                model.put("content", map);

                File path = new File(config.getDestinationFolder() + File.separator + tagPath + File.separator + tag + config.getOutputExtension());
                map.put(Attributes.ROOTPATH, FileUtil.getUriPathToDestinationRoot(config, path));
                
                render(new ModelRenderingConfig(path, Attributes.TAG, model, findTemplateName(Attributes.TAG)));

                renderedCount++;
            } catch (Exception e) {
                errors.add(e);
            }
        }

        if (config.getRenderTagsIndex()) {
            try {
                // Add an index file at root folder of tags.
                // This will prevent directory listing and also provide an option to
                // display all tags page.
                Map<String, Object> model = new HashMap<String, Object>();
                model.put("renderer", renderingEngine);
                Map<String, Object> map = buildSimpleModel(Attributes.TAGS);
                model.put("content", map);

                File path = new File(config.getDestinationFolder() + File.separator + tagPath + File.separator + "index" + config.getOutputExtension());
                map.put(Attributes.ROOTPATH, FileUtil.getUriPathToDestinationRoot(config, path));
                render(new ModelRenderingConfig(path, "tagindex", model, findTemplateName("tagsindex")));
                renderedCount++;
            } catch (Exception e) {
                errors.add(e);
            }
        }

        if (!errors.isEmpty()) {
            StringBuilder sb = new StringBuilder();
            sb.append("Failed to render tags. Cause(s):");
            for (Throwable error : errors) {
                sb.append("\n").append(error.getMessage());
            }
            throw new Exception(sb.toString(), errors.get(0));
        } else {
            return renderedCount;
        }
    }