Loads an array with data about $typeId in $status.

@param mixed $typeId
@param int $status

@return array Data rows.
500141
public function loadTypeData($typeId, $status)
    {
        $q = $this->getLoadTypeQueryBuilder();
        $q
            ->where($q->expr()->eq('c.id', ':id'))
            ->andWhere($q->expr()->eq('c.version', ':version'))
            ->setParameter('id', $typeId, ParameterType::INTEGER)
            ->setParameter('version', $status, ParameterType::INTEGER);

        return $q->execute()->fetchAll();
    }
284730
public function getById($typeId, array $queryParams = [])
    {
        $response = $this->api
            ->applications()
            ->scans()
            ->issues()
            ->origins()
            ->types()
            ->getById($typeId, $queryParams);

        return new TypeResponse($response);
    }
845975
public function loadRulesData(int $status, ?Layout $layout = null, int $offset = 0, ?int $limit = null): array
    {
        $query = $this->getRuleSelectQuery();

        if ($layout instanceof Layout) {
            $query->andWhere(
                $query->expr()->eq('layout_id', ':layout_id')
            )
            ->setParameter('layout_id', $layout->id, Type::INTEGER);
        }

        $query->addOrderBy('rd.priority', 'DESC');

        $this->applyStatusCondition($query, $status, 'r.status');
        $this->applyOffsetAndLimit($query, $offset, $limit);

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
60262
static function fetchByContentObjectID( $contentObjectID, $languageID, $status = null, $sorts = null, $offset = null, $length = null )
    {
        $cond = array();
        $cond['contentobject_id'] = $contentObjectID;
        if ( $languageID !== false )
        {
            $cond['language_id'] = $languageID;
        }
        if( !is_null( $status ) )
        {
            $cond['status'] = $status;
        }
        if ( is_null( $offset ) || is_null( $length ) )
        {
            return null;
        }
        else
        {
            $limit = array( 'offset' => $offset, 'length' => $length);
            $return = eZPersistentObject::fetchObjectList( self::definition(), null, $cond, $sorts, $limit );
            return $return;
        }
    }
1171768
public function loadZoneData($layoutId, int $status, string $identifier): array
    {
        $query = $this->getZoneSelectQuery();
        $query->where(
            $query->expr()->andX(
                $query->expr()->eq('layout_id', ':layout_id'),
                $query->expr()->eq('identifier', ':identifier')
            )
        )
        ->setParameter('layout_id', $layoutId, Type::INTEGER)
        ->setParameter('identifier', $identifier, Type::STRING);

        $this->applyStatusCondition($query, $status);

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
799431
public function getFilteredQuery($status, $type)
    {
        $query = $this->createQueryBuilder('n');

        if (is_int($status) && in_array($status, NoticeEntity::getStatuses())) {
            $query
                ->where('n.status = :status')
                ->setParameter('status', $status);
        }

        if ($type) {
            $query
                ->andWhere('n.type = :type')
                ->setParameter('type', $type);
        }

        return $query;
    }
698576
public function loadTypeDataByIdentifier($identifier, $status)
    {
        try {
            return $this->innerGateway->loadTypeDataByIdentifier($identifier, $status);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
284931
protected function loadFromRows(array $rows, $typeIdentifier, $status)
    {
        $types = $this->mapper->extractTypesFromRows($rows);
        if (count($types) !== 1) {
            throw new Exception\TypeNotFound($typeIdentifier, $status);
        }

        return $types[0];
    }
432883
public function loadTargetData($targetId, int $status): array
    {
        $query = $this->getTargetSelectQuery();
        $query->where(
            $query->expr()->eq('id', ':id')
        )
        ->setParameter('id', $targetId, Type::INTEGER);

        $this->applyStatusCondition($query, $status);

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
15969
public function get($typeId)
    {
        if (!isset($this->types[$typeId])) {
            throw new InvalidArgumentException("Type $typeId not found.");
        }

        return $this->types[$typeId];
    }
984893
static function fetchByStatus( $statusID, $asObject = true )
    {
        if ( $statusID == 0 )
            return eZOrderStatus::createUndefined();
        return eZPersistentObject::fetchObject( eZOrderStatus::definition(),
                                                null,
                                                array( "status_id" => $statusID ),
                                                $asObject );
    }
1049732
protected function getTypeById($typeId)
    {
        /** @var CollectionType $type */
        $type = $this->em->getRepository('SuluMediaBundle:CollectionType')->find($typeId);
        if (!$type) {
            throw new CollectionTypeNotFoundException('Collection Type with the ID ' . $typeId . ' not found');
        }

        return $type;
    }
506282
public function setStatus($id, $status)
    {
        if (!is_numeric($status)) {
            throw new Exception('Status argument must be an integer');
        }

        $entity = $this->findById($id)->firstOrFail();
        $entity->status = $status;
        $this->save($entity);

        return $entity;
    }
572816
public function getByStatus($status)
    {
        return array_filter($this->slaves, function ($slave) use ($status) {
            return $status === Slave::ANY || $status === $slave->getStatus();
        });
    }
562972
public function search($params, $status = null)
    {
        $order = (empty($status)) ? Order::find()->where(['user_id' => \Yii::$app->user->id])->one() :
            Order::find()->where(['user_id' => \Yii::$app->user->id, 'status' => $status])->one();

        if (!empty($order)) {
            $query = OrderProduct::find();

            // add conditions that should always apply here

            $dataProvider = new ActiveDataProvider([
                'query' => $query,
            ]);

            $this->load($params);

            if (!$this->validate()) {
                // uncomment the following line if you do not want to return any records when validation fails
                // $query->where('0=1');
                return $dataProvider;
            }

            // grid filtering conditions
            $query->andFilterWhere([
                'id' => $this->id,
                'product_id' => $this->product_id,
                'order_id' => $order->id,
                'count' => $this->count,
            ]);

            return $dataProvider;
        }


    }
576791
public function loadBlockCollectionIds(array $blockIds, ?int $status = null): array
    {
        $query = $this->connection->createQueryBuilder();
        $query->select('DISTINCT bc.collection_id')
            ->from('ngbm_block_collection', 'bc')
            ->where(
                $query->expr()->in('bc.block_id', [':block_id'])
            )
            ->setParameter('block_id', $blockIds, Connection::PARAM_INT_ARRAY);

        if ($status !== null) {
            $this->applyStatusCondition($query, $status, 'bc.block_status', 'block_status');
        }

        $result = $query->execute()->fetchAll(PDO::FETCH_ASSOC);

        return array_column($result, 'collection_id');
    }
1299511
protected function respond($data, $status = Response::HTTP_OK, $headers = []) : JsonResponse
    {
        if ($data instanceof ElementInterface) {
            $data = new Document($data);
        }

        if ($data instanceof Document) {
            $data = $data->toArray();
        }

        return response()->json($data, $status, $headers)
            ->header('Content-Type', ApiRequestHandler::CONTENT_TYPE);
    }