@function getComponent

get component by name - throws error if not defined

@param {string} name

@returns {ImmutableCoreComponent}

@throws {Error}
346576
function getComponent (name) {
    // get component
    var component = global().components[name]
    // throw error if note defined
    this.assert(defined(component), 103, `${name} component not defined`)
    // return component
    return component
}
501646
public final <C extends CalendarComponent> ComponentList<C> getComponents(final String name) {
        return getComponents().getComponents(name);
    }
738157
function component(color, name) {
  utils.assertColor(color, 'color');
  utils.assertString(name, 'name');
  var name = name.string
    , unit = unitMap[name]
    , type = typeMap[name]
    , name = componentMap[name];
  if (!name) throw new Error('invalid color component "' + name + '"');
  return new nodes.Unit(color[type][name], unit);
}
781876
public List<RawComponent> getExperimentalComponents(String name) {
		/*
		 * Note: The returned list is not backed by the parent component because
		 * this would allow RawComponent objects without the specified name to
		 * be added to the list.
		 */
		List<RawComponent> toReturn = new ArrayList<RawComponent>();
		for (RawComponent component : getExperimentalComponents()) {
			if (component.getName().equalsIgnoreCase(name)) {
				toReturn.add(component);
			}
		}
		return Collections.unmodifiableList(toReturn);
	}
755582
protected function getComponentId($name)
    {
        $where  = [
            'name'    => $name,
            'type_id' => app(ComponentTypes::class)->newInstance()->getDefault()->id
        ];
        $exists = $this->makeModel()->where($where)->first();
        if (!is_null($exists)) {
            return $exists->id;
        }
        $component = $this->makeModel()->getModel()->newInstance($where);
        $component->save();
        return $component->id;
    }
140613
public function findComponentByName($name)
    {
        if (isset($this->page->components[$name])) {
            return $this->page->components[$name];
        }

        if (isset($this->layout->components[$name])) {
            return $this->layout->components[$name];
        }

        $partialComponent = $this->partialStack->getComponent($name);
        if ($partialComponent !== null) {
            return $partialComponent;
        }

        return null;
    }
43598
public Object getComponentNewInstance(String name) {
		Debug.logVerbose("[JdonFramework]getComponentNewInstance: name=" + name, module);
		ComponentAdapter componentAdapter = container.getComponentAdapter(name);
		if (componentAdapter == null) {
			Debug.logWarning("[JdonFramework]Not find the component in container :" + name, module);
			return null;
		}
		return componentAdapter.getComponentInstance(container);
	}
642031
public static Component getDescendantNamed(String name, Component parent) {

        Assert.notNull(name, "name");
        Assert.notNull(parent, "parent");

        if (name.equals(parent.getName())) { // Base case
            return parent;
        } else if (parent instanceof Container) { // Recursive case
            for (final Component component : ((Container) parent).getComponents()) {

                final Component foundComponent = SwingUtils.getDescendantNamed(name, component);

                if (foundComponent != null) {
                    return foundComponent;
                }
            }
        }

        return null;
    }
294187
function(name) {
			var result = {};
			this.getArray(name).forEach(function(val) {
				var parts = val.split(':');
				result[parts[0]] = parts[1];
			});
			
			return result;
		}
884338
public function getComponentVerified(string $name): ?IComponent
    {
        /** @var Presenter $presenter */
        $presenter = $this->getPresenter();

        return $presenter->getVerifier()->isComponentVerified($name, $presenter->getRequest(), $this) ? $this->getComponent($name) : null;
    }
1899
function(name) {
                        this._checkObject(name);

                        if (!this._hasObject([name])) {
                            this._setObject([name], this._getObjectCreator([name]).call())._removeObjectCreator([name]);
                        }
                        return this._getObject([name]);
                    }
1212723
Optional<PackingPlan.InstancePlan> getInstance(String componentName, int componentIndex) {
    for (PackingPlan.InstancePlan instancePlan : this.instances) {
      if (instancePlan.getComponentName().equals(componentName)
          && instancePlan.getComponentIndex() == componentIndex) {
        return Optional.of(instancePlan);
      }
    }
    return Optional.absent();
  }
92257
function ImmutableCoreComponent (args) {
    // require args
    this.assert(typeof args === 'object' && args, 100)
    // create ImmutableCore module and methods
    this.initModule(args)
    // initialize server component
    this.initServer(args)
    // initialize client component
    this.initClient(args)
    // initialize js and css assets
    this.initAssets(args)
    // initialize handlebars helpers, partials and template
    this.initHandlebars(args)
}
448921
function(name) {
      var jCalLen = this.jCal[COMPONENT_INDEX].length;
      var i = 0;

      if (name) {
        var comps = this.jCal[COMPONENT_INDEX];
        var result = [];

        for (; i < jCalLen; i++) {
          if (name === comps[i][NAME_INDEX]) {
            result.push(
              this._hydrateComponent(i)
            );
          }
        }
        return result;
      } else {
        if (!this._components ||
            (this._hydratedComponentCount !== jCalLen)) {
          for (; i < jCalLen; i++) {
            this._hydrateComponent(i);
          }
        }

        return this._components || [];
      }
    }
137
protected function createComponent($name): ?IComponent
    {
        $method = 'createComponent'.ucfirst($name);
        if (method_exists($this, $method)) {
            $this->checkRequirements(self::getReflection()->getMethod($method));
        }

        return parent::createComponent($name);
    }
878301
public <T> T get(@NotNull String name, @NotNull T defaultValue) {
    return getForComponent(component, name, defaultValue);
  }
545200
public function getComponentByName($name)
    {
        foreach ($this->getComponents() as $component) {
            if ($component->getName() === $name) {
                return $component;
            }
        }
    }