Carbon_Fields\Field\Complex_Field::get_group_by_name PHP Method

get_group_by_name() public method

Retrieve a group by its name.
public get_group_by_name ( string $group_name ) : Group_Field
$group_name string Group name
return Group_Field $group_object Group object
    public function get_group_by_name($group_name)
    {
        $group_object = null;
        foreach ($this->groups as $group) {
            if ($group->get_name() == $group_name) {
                $group_object = $group;
            }
        }
        return $group_object;
    }