Load group by identifier

@param int $id

@return Group

@throws \InvalidArgumentException
422928
public function findOne($id)
    {
        $group = $this
            ->database
            ->query(
                "SELECT * FROM {ucms_group} WHERE id = :id LIMIT 1 OFFSET 0",
                [':id' => $id]
            )
            ->fetchObject(Group::class)
        ;

        if (!$group) {
            throw new \InvalidArgumentException("Group does not exists");
        }

        return $group;
    }
234057
public function loadByMageOrderId($id)
    {
        $order = $this->_getResource()->getByOrderId($id);
        if (!empty($order)) {
            $this->setData($order);
        }

        return $this;
    }
966161
public function getById($id)
    {
        if (isset($this->elements[$id])) {
            return $this->elements[$id];
        }

        throw new \InvalidArgumentException(sprintf('Element for id %s does not exist', $id));
    }
1251687
protected function getLogGroup(string $id) : LogGroup
    {
        if (!isset($this->data['logs'][$id])) {
            $this->data['logs'][$id] = new LogGroup();
        }

        return $this->data['logs'][$id];
    }
1127626
private function load($id = null)
    {

        $this->initialize();
        $this->id = $id;

        return $this->getDataConnector()->loadResourceLink($this);

    }
932943
public function getGroup($id)
    {
        if (!array_key_exists($id, $this->groups_by_id)) {
            throw new SwatWidgetNotFoundException(
                "Group with an id of '{$id}' not found."
            );
        }

        return $this->groups_by_id[$id];
    }
1014575
private function load($id = null)
    {

        $this->initialize();
        $this->id = $id;
        return $this->getDataConnector()->loadContext($this);

    }
272133
public function loadObjectStateListData($groupId)
    {
        try {
            return $this->innerGateway->loadObjectStateListData($groupId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
421634
public function setGroupId( $groupId )
    {
        $this->groupId = (int) $groupId ?: null;

        if ( $this->group && $this->group->id != $this->groupId )
        {
            $this->group = null;
        }

        return $this;
    }
95551
public function index(string $id = null)
    {
        if (empty($id)) {
            throw new InvalidArgumentException();
        }

        $list = $this->DblistItems->Dblists->get($id);
        $query = $this->DblistItems->find('treeEntities', ['listId' => $id]);

        if ($query->isEmpty()) {
            $this->Flash->set('List is empty, do you want to add new item?');

            return $this->redirect(['action' => 'add', $id]);
        }

        $this->set(compact('query', 'list'));
        $this->set('_serialize', ['entities']);
    }
349068
public function getGroup ($groupID)
    {
        $groups = $this->getAllGroups();
        
        foreach ($groups as $group) {
            if ($group->getID() == $groupID) {
                return $group;
            }
        }
        
        return null;
    }
289796
public function getGroupById($id)
    {
        return $this->apiCall('groups.info', [
            'channel' => $id,
        ])->then(function (Payload $response) {
            return new Group($this, $response['group']);
        });
    }
3833
public function load(AggregateId $aggregateId)
    {
        $result = $this->getEntityManager()->find($aggregateId->aggregateClass(), $aggregateId->value());
        Preconditions::checkArgument($result !== null, 'Aggregate with ID [%s] does not exist', $aggregateId);
        return $result;
    }
188351
public function get($id)
    {
        foreach ($this->instructions as $instruction) {
            if (!$instruction instanceof Node && !$instruction instanceof Subgraph) {
                continue;
            }

            if ($instruction->getId() == $id) {
                return $instruction;
            }
        }

        throw new \InvalidArgumentException(sprintf('Found no node or graph with id "%s" in "%s".', $id, $this->id));
    }
1280949
public function getById(int $id): Series
    {
        $json = $this->parent->performAPICallWithJsonResponse('get', '/series/'.$id);
        return DataParser::parseData($json, Series::class);
    }
75258
public function getFromGroupWithChartType($id)
    {
        $query = $this->createQueryBuilder('c')
            ->join('c.libs', 'lib')
            ->addSelect('lib')
            ->join('lib.type', 'type')
            ->addSelect('type')
            ->where('c.idGroup = :idGroup')
            ->setParameter('idGroup', $id);

        return $query->getQuery()->getResult();
    }
746100
public function findByConfigGroupId($id)
    {
        $query = $this->createQueryBuilder('v')
            ->innerJoin('v.configType', 't')
            ->where('v.configGroup = :gid')
            ->setParameter('gid', $id)
            ->orderBy('v.position', 'ASC')
            ->getQuery();
        $result = $query->getResult();

        return $result;
    }