Get group id by name.

@param string $name

@return int|null
769617
public function getGroupIdByName($name)
    {
        if (!isset($this->groups)) {
            $this->resetCraftSitesServiceGroupsCache();

            $this->groups = [];
            foreach (Craft::$app->sites->getAllGroups() as $group) {
                $this->groups[$group->name] = $group->id;
            }
        }
        if (!array_key_exists($name, $this->groups)) {
            $group = new SiteGroup(['name' => $name]);
            if (Craft::$app->sites->saveGroup($group)) {
                $this->groups[$name] = $group->id;
            } else {
                Schematic::importError($group, $name);

                return null;
            }
        }

        return $this->groups[$name];
    }
1291871
public function getGroupLogins($groupName)
    {
        if (!isset($this->config[$groupName])) {
            return null;
        }

        return $this->config[$groupName]['logins']->getRawValue();
    }
676515
public function getGroup($name) {
		$names = explode("/", $name);
		
		$parent = $this;
		foreach ($names as $tmpName) {
			if (!isset($parent->subGroups[$tmpName])) {
				$newGroup = new MoufGroupDescriptor();
				$parent->subGroups[$tmpName] = $newGroup;
				$parent = $newGroup;
			} else {
				$parent = $parent->subGroups[$tmpName];
			}
		}
		return $parent;
	}
625448
public function getSectionByName($name)
    {
        foreach ($this->sections as $i => $sec) {
            if ($sec instanceof Section) {
                if ($sec->getName() == $name) {
                    return $sec;
                }
            }
        }
        return null;
    }
322321
public function getField(string $name = '', string $group = 'default')
    {
        /** @var SectionInterface $section */
        $section = $this->groups[$group];

        $foundItems = array_filter($section->getItems(), function (FieldTypeInterface $item) use ($name) {
            return $name === $item->getBaseName();
        });

        return ! empty($foundItems) ? array_shift($foundItems) : [];
    }
798242
public function getSlotByName($name)
    {
        foreach ($this->slots as $slot) {
            if ($slot->name === $name) {
                return $slot;
            }
        }

        return null;
    }
576050
public function getGroupByName($name)
    {
        return $this->getGroups()->then(function (array $groups) use ($name) {
            foreach ($groups as $group) {
                if ($group->getName() === $name) {
                    return $group;
                }
            }

            throw new ApiException('Group ' . $name . ' not found.');
        });
    }
1021639
public function getVariable($group, $name)
    {
        $variables = $this->getVariables($group);

        return array_key_exists($name, $variables) ? $variables[$name] : null;
    }
382703
public function getGroup($groupName)
    {
        return isset($this->groups[$groupName]) ? $this->groups[$groupName] : null;
    }
366745
public function get($name, array $parameters = array())
    {
        if ($this->hasGroup($name)) {
            return $this->callGroup($name, $parameters);
        }

        if ($this->has($name)) {
            $callback = $this->widgets[$name];

            return $this->getCallback($callback, $parameters);
        }

        return null;
    }
1047444
public function get($name)
    {
        return isset($this->value[$name])
            ? $this->value[$name]
            : null;
    }
190402
public function getField($name, $group = '')
    {
        if ($group) {
            $name = $group . '/' . $name;
        }

        return isset($this->fields[$name]) ? $this->fields[$name] : null;
    }
349068
public function getGroup ($groupID)
    {
        $groups = $this->getAllGroups();
        
        foreach ($groups as $group) {
            if ($group->getID() == $groupID) {
                return $group;
            }
        }
        
        return null;
    }
903235
public function get(string $name): string {
		$forms = $this->forms;
		foreach ($forms as $id => $item) {
			$val = $item->get();
			if (isset($val[$name]) && $val[$name]) {
				return $id;
			}
		}

		return false;
	}
1277005
public function getAlias($name)
        {
            if (isset($this->_aliases[$name])) {
                return $this->_aliases[$name];
            }

            return null;
        }
1216834
public function get($name)
    {
        if ($this->argument->defined($name)) {
            return $this->argument->get($name);
        }
        return null;
    }
1219794
public function lastIndexByName($name) {
        for ($i = count($this->tokens) - 1; $i >= 0; $i--) {
            if ($this->tokens[$i]->getName() === $name) {
                return $i;
            }
        }

        return null;
    }