Find a <b>widget</b> with given name in hierarchy of this view's parents

@param {string} name Name of the widget
@returns {Lava.widget.Standard}
6820
function(name) {

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

		var result = this._widget;

		while (result && result.name != name) {

			result = result.getParentWidget();

		}

		return result;

	}
597726
function(name) {
    var command;
    if (name) {
      command = this.commands[name] = {
        name: name,
        specs: {}
      };
    }
    else {
      command = this.fallback = {
        specs: {}
      };
    }

    // facilitates command('name').options().cb().help()
    var chain = {
      options : function(specs) {
        command.specs = specs;
        return chain;
      },
      opts : function(specs) {
        // old API
        return this.options(specs);
      },
      option : function(name, spec) {
        command.specs[name] = spec;
        return chain;
      },
      callback : function(cb) {
        command.cb = cb;
        return chain;
      },
      help : function(help) {
        command.help = help;
        return chain;
      },
      usage : function(usage) {
        command._usage = usage;
        return chain;
      }
    };
    return chain;
  }
739533
public Page findAncestor(String name) {
        Path rootPath = Paths.get(mdw.getAssetRoot().getPath()).normalize();
        Path pkgPath = Paths.get(getAsset().getFile().getPath()).normalize();
        while (pkgPath != null && pkgPath.startsWith(rootPath)) {
            if (new File(pkgPath + "/" + PackageDir.PACKAGE_JSON_PATH).exists() || new File(pkgPath + "/" + PackageDir.PACKAGE_YAML_PATH).exists() ) {
                Page p = new Page(mdw, "/" + rootPath.relativize(pkgPath).toString().replace('\\', '/') + "/" + name);
                if (p.exists())
                    return p;
            }
            pkgPath = pkgPath.getParent();
        }
        return null;
    }
1250091
public XNElement childElement(String name) {
        for (XNElement e : children) {
            if (e.name.equals(name)) {
                return e;
            }
        }
        return null;
    }
629036
function getChild(obj, name) {
  return _.find(obj.children, function(child) {
    return child.name == name;
  });
}
1148263
public static Element getChild(final String name, final Element root) {
		@SuppressWarnings("unchecked")
		List<Element> allChildren = root.getChildren();
		for (Element child : allChildren) {
			if (child.getName().equals(name)) {
				return child;
			}
		}
		return null;
	}
249941
protected Node getComponentByName(String name) throws QTasteException {
        mFoundComponent = null;
        mFindWithEqual = false;
        LOGGER.debug("try to find a component with the name : " + name);
        // TODO: Think about several component having the same names!
        for (Stage s : getStages()) {
            if (mFindWithEqual) {
                break;
            }
            if (!checkName(name, s.getScene().getRoot()) || !mFindWithEqual) {
                LOGGER.debug("parse window");
                lookForComponent(name, s.getScene().getRoot().getChildrenUnmodifiable());
            }
        }
        if (mFoundComponent != null) {
            //			Parent parent = mFoundComponent.getParent();
            //			//active the parent
            //			while ( parent != null && !(parent instanceof Window) )
            //			{
            //				parent = parent.getParent();
            //			}
            //			if ( parent != null )
            //				((Window)parent).toFront();

            return mFoundComponent;
        }
        throw new QTasteTestFailException("The component \"" + name + "\" is not found.");
    }
375769
function findParent(element, options) {
          var parent = options.parent;

          // 
          if (angular.isFunction(parent)) {
            parent = parent(options.scope, element, options);
          } else if (angular.isString(parent)) {
            parent = angular.element($document[0].querySelector(parent));
          } else {
            parent = angular.element(parent);
          }

          // If parent querySelector/getter function fails, or it's just null,
          // find a default.
          if (!(parent || {}).length) {
            var el;
            if ($rootElement[0] && $rootElement[0].querySelector) {
              el = $rootElement[0].querySelector(':not(svg) > body');
            }
            if (!el) el = $rootElement[0];
            if (el.nodeName == '#comment') {
              el = $document[0].body;
            }
            return angular.element(el);
          }

          return parent;
        }
750130
public Config getChild(String name)
  {
    Params.notNullOrEmpty(name, "Child name");
    for(Config child : children) {
      if(child.name.equals(name)) {
        return child;
      }
    }
    return null;
  }
12047
private Xpp3Dom getChild(Xpp3Dom parentNode, String name) {
		Xpp3Dom child = parentNode.getChild(name);
		if (child != null) {
			return child;
		}
		
		return parentNode.getChild(namespace + name);
	}
688702
static public function widget($name=null)
	{
	    if ($name = static::findClass($name, 'widget')) {
	        $id = 'widget' . ($name ? '.' . $name : '');
	        if (!static::has($id)) {
	            static::setShared($id, function () use ($name) {
	                if ($name instanceof \Wslim\View\Widget) {
	                    return $name::instance();
	                } else {
	                    return new $name;
	                }
	            });
	        }
	        return static::get($id);
	    }
	    return null;
	}
469566
function find(map, name) {
	name = name.toLowerCase();
	for (const key in map) {
		if (key.toLowerCase() === name) {
			return key;
		}
	}
	return undefined;
}
274953
private Element getChildElement(String name) {
        if (currentChild == null) {
            // element has no children.
            return null;
        }
        Node start = currentChild;
        do {
            Node node = currentChild;
            currentChild = currentChild.getNextSibling();
            if (currentChild == null) {
                currentChild = currentElement.getFirstChild();
            }
            if (node.getNodeType() == Node.ELEMENT_NODE
                    && node.getNodeName().equals(name)) {
                return (Element) node;
            }
        } while (currentChild != start);
        return null;
    }
541961
public AiNode findNode(String name) {
        /* classic recursive depth first search */
        
        if (m_name.equals(name)) {
            return this;
        }
        
        for (AiNode child : m_children) {
            if (null != child.findNode(name)) {
                return child;
            }
        }
        
        return null;
    }
606858
function(name) {
                var colorValue = this.color[name] || StandardColor.EXTEND_STANDARD[name] || StandardColor.COLOR_STANDARD[name] || "";
                if (colorValue) {
                    return new Color(colorValue);
                }
                return null;
            }
975674
@CheckForNull
    public View getView(@CheckForNull String name) {
        if (name == null) {
            return null;
        }
        //Top level views returned first if match
        List<View> views = views();
        for (View v : views) {
            if (v.getViewName().equals(name)) {
                return v;
            }
        }
        for (View v : views) {
            //getAllViews() cannot be used as it filters jobs by permission which is bad e.g. when trying to add a new job
            if (v instanceof ViewGroup) {
                View nestedView = ((ViewGroup) v).getView(name);
                if (nestedView != null) {
                    return nestedView;
                }
            }
        }
        if (!name.equals(primaryView())) {
            // Fallback to subview of primary view if it is a ViewGroup
            View pv = getPrimaryView();
            if (pv instanceof ViewGroup)
                return ((ViewGroup)pv).getView(name);
            if (pv instanceof AllView && AllView.DEFAULT_VIEW_NAME.equals(pv.name)) {
                // JENKINS-38606: primary view is the default AllView, is somebody using an old link to localized form?
                for (Locale l : Locale.getAvailableLocales()) {
                    if (name.equals(Messages._Hudson_ViewName().toString(l))) {
                        // why yes they are, let's keep that link working
                        return pv;
                    }
                }
            }
        }
        return null;
    }
1367320
public String find(String name) {
        String value = null;
        for (DataBinder top = this; top != null && (value = top.get(name)) == null; top = top.getLower());
        return value;
    }