Finds child component by name.

@param string $name
@return null|ComponentInterface
545200
public function getComponentByName($name)
    {
        foreach ($this->getComponents() as $component) {
            if ($component->getName() === $name) {
                return $component;
            }
        }
    }
70499
public function getChild( $name )
	{
		if( !array_key_exists( $name, $this->children ) )
			throw new InvalidArgumentException( 'A Child with Name "'.$name.'" is not existing.' );
		return $this->children[$name];
	}
589124
public function findNeedByName($name)
    {
        // No needs defined yet.
        if (is_null($this->needs)) {
            return null;
        }

        // Traverse and Return.
        return $this->traverseNodesAndFindBy('name', $name, $this->needs);
    }
1118548
public function getComponentType($name)
    {
        $types = $this->getComponentTypes();
        return empty($types[$name]) ? '' : $types[$name];
    }
159724
public function findNode(string $name)
    {
        if (isset($this->nodes[$name])) {
            return $this->nodes[$name];
        }

        foreach ($this->graphs as $graph) {
            $node = $graph->findNode($name);
            if ($node) {
                return $node;
            }
        }

        return null;
    }
1174174
public function getChild(string $name): ?vfsStreamContent
    {
        $childName = $this->getRealChildName($name);
        foreach ($this->children as $child) {
            if ($child->getName() === $childName) {
                return $child;
            }

            if (!$child instanceof vfsStreamContainer) {
                continue;
            }

            if ($child->appliesTo($childName) && $child->hasChild($childName)) {
                return $child->getChild($childName);
            }
        }

        return null;
    }
706952
public function getProperty($name)
    {
        foreach ($this->getChildProperties() as $property) {
            if ($property->getName() === $name) {
                return $property;
            }
        }

        return;
    }
348004
public function findAttribute($name)
    {
        foreach ($this->attributes as $attribute) {
            if ($attribute->getName() === $name) {
                return $attribute;
            }
        }

        return null;
    }
923377
public function findChildrenByParentName($name)
    {
        $parent = $this->findOneByName($name);

        return $this->findChildrenByParentId($parent->getId());
    }
367216
public function getComponent($name)
    {
        if (!$this->activePartial) {
            return null;
        }

        $component = $this->findComponentFromStack($name, $this->activePartial);
        if ($component !== null) {
            return $component;
        }

        foreach ($this->partialStack as $stack) {
            $component = $this->findComponentFromStack($name, $stack);
            if ($component !== null) {
                return $component;
            }
        }

        return null;
    }
99183
public function children($name = null)
    {
        $child = $this->get($name);
        if (!$child) {
            return [];
        }
        return $child->_children;
    }
1172649
public function find($name)
    {

        if (strpos($name, '::') !== false) {
            return $this->findNamedPathView($name);
        }
        return $this->findInPaths($name, $this->paths);
    }
274372
public function getComponent($name)
    {
        foreach ($this->getComponents() as $component) {
            if ($component->getName() == $name) {
                return $component;
            }
        }
        throw new ComponentException(
            sprintf("'%s' is not a registered component", $name)
        );
    }
792927
public function findSection($name)
    {
        foreach ($this->getSections() as $section) {
            if ($section->getKey() == $name) {
                return $section;
            }
        }

        foreach ($this->getSections() as $section) {
            $found = $section->findSection($name);
            if (! is_null($found)) {
                return $found;
            }
        }

        return;
    }
901197
public function getChildForName($name)
    {
        $criteria = Criteria::create()
            ->where(Criteria::expr()->eq('name', $name))
        ;

        return $this->getChildren()->matching($criteria)->first();
    }
1265128
public function getComponent($name)
    {
        if (isset($name) && isset($this->_oaComponents[$name])) {
            return $this->_oaComponents[$name];
        }
    }
238550
public function getChildRelationship($name)
    {
        return $this->getChildRelationships()->filter(function($input) use ($name) {
            return $name === $input->getRelationshipName();
        })->first();
    }