Returns all data for specified target.

@param int|string $targetId
@param int $status

@return array
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);
    }
127009
public function loadQueryData($queryId, int $status): array
    {
        $query = $this->getQuerySelectQuery();
        $query->where(
            $query->expr()->eq('q.id', ':id')
        )
        ->setParameter('id', $queryId, Type::INTEGER);

        $this->applyStatusCondition($query, $status, 'q.status');

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
576575
public function batchGet($departmentId, $fetchChild = null, $status = null)
    {
        $params = [
            'department_id' => $departmentId,
            'fetch_child'   => $fetchChild,
            'status'        => $status,
        ];

        return $this->parseJSON('get', [self::API_BATCH_GET, $params]);
    }
615749
public function getFileLink($fileId, $target)
    {
        $file = Yii::$app->storage->getFile($fileId);
        if ($file) {
            $file->setTarget($target);
        }
        return $file;
    }
544407
public function loadBlockData($blockId, int $status): array
    {
        $query = $this->getBlockSelectQuery();
        $query->where(
            $query->expr()->eq('b.id', ':id')
        )
        ->setParameter('id', $blockId, Type::INTEGER);

        $this->applyStatusCondition($query, $status, 'b.status');

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
368883
protected function getTargetNode(ObjectId $targetOID) {
    if ($this->targetNode == null) {
      // load parent node
      $persistenceFacade = $this->getPersistenceFacade();
      $targetNode = $persistenceFacade->load($targetOID);
      $this->targetNode = $targetNode;
    }
    return $this->targetNode;
  }
757653
private function findFriendshipsByStatus($status, $limit, $offset): array
    {
        $friendships = [];

        $query = Friend::where(function ($query) use ($status) {
            $query->where('sender_id', $this->id);
            $query->where('sender_type', get_class($this));

            if (!empty($status)) {
                $query->where('status', $status);
            }
        })->orWhere(function ($query) use ($status) {
            $query->where('recipient_id', $this->id);
            $query->where('recipient_type', get_class($this));

            if (!empty($status)) {
                $query->where('status', $status);
            }
        });

        if (!empty($limit)) {
            $query->take($limit);
        }

        if (!empty($offset)) {
            $query->skip($offset);
        }

        foreach ($query->get() as $friendship) {
            $friendships[] = $this->getFriendship($this->find(
                ($friendship->sender_id == $this->id) ? $friendship->recipient_id : $friendship->sender_id
            ));
        }

        return $friendships;
    }
572816
public function getByStatus($status)
    {
        return array_filter($this->slaves, function ($slave) use ($status) {
            return $status === Slave::ANY || $status === $slave->getStatus();
        });
    }
1281895
public function createDeploymentStatus(int $id, string $state, string $targetUrl = '',
                                           string $description = ''): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/deployments/:id/statuses',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $id), Request::METHOD_POST, [
                'state'       => $state,
                'target_url'  => $targetUrl,
                'description' => $description
            ]);
    }
1259140
public function loadLayoutData($layoutId, int $status): array
    {
        $query = $this->getLayoutSelectQuery();
        $query->where(
            $query->expr()->eq('l.id', ':id')
        )
        ->setParameter('id', $layoutId, Type::INTEGER);

        $this->applyStatusCondition($query, $status, 'l.status');

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
472049
protected function getStatusData($status, $messages = null, $msgKey = 'messages')
	{
		$data = ['status' => $status];

		if ($messages !== null) {
			if ($messages instanceof MessageProviderInterface) {
				$messages = $messages->getMessageBag();
			}

			if ($messages instanceof ArrayableInterface) {
				$messages = $messages->toArray();
			}

			$data[$msgKey] = (array) $messages;
		}

		return $data;
	}
1104609
public function batchGet($offset, $count = 50, array $status_list = [])
    {
        $data = ['offset' => $offset, 'count' => $count];
        empty($status_list) || $data['status_list'] = $status_list;
        $url = "https://api.weixin.qq.com/card/batchget?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, $data);
    }
457360
public function getDepartmentUserInfoList($departmentId, $fetchChild = 0, $status = 0)
    {
        $result = $this->httpGet(self::WECHAT_DEPARTMENT_USERS_INFO_LIST_GET_PREFIX, [
            'access_token' => $this->getAccessToken(),
            'department_id' => $departmentId,
            'fetch_child' => $fetchChild,
            'status' => $status,
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'ok' ? $result['userlist'] : $this->dump($result);
    }
529878
public function lists($departmentId, $fetchChild = null, $status = null)
    {
        $params = [
            'department_id' => $departmentId,
            'fetch_child'   => $fetchChild,
            'status'        => $status,
        ];

        return $this->parseJSON('get', [self::API_LIST, $params]);
    }
1121490
public function list($offset = 0, $count = 10, $statusList = 'CARD_STATUS_VERIFY_OK')
    {
        $params = [
            'offset' => $offset,
            'count' => $count,
            'status_list' => $statusList,
        ];

        return $this->httpPostJson('card/batchget', $params);
    }
807489
public function getStatistics($status)
    {
        $qb = $this->createQueryBuilder('q');
        $qb->select('SUBSTRING(q.job, 1, 200) AS class');
        $qb->where($qb->expr()->eq('q.status', $qb->expr()->literal($status)));

        $result = $qb->getQuery()->getScalarResult();

        $stats = [];
        foreach ($result as $item) {
            if (!preg_match('/"(.+?)"/', $item['class'], $match)) {
                continue;
            }
            $class = $match[1];
            if (!isset($stats[$class])) {
                $stats[$class] = 0;
            }
            ++$stats[$class];
        }

        return $stats;
    }
132258
public function update($reactionId, array $data=null, array $targetFeeds=null)
    {
        $payload = [];
        if( $data !== null ){
            $payload['data'] = $data;
        }
        if( $targetFeeds !== null ){
            $payload['target_feeds'] = $targetFeeds;
        }
        $response = $this->doRequest('PUT', 'reaction/' . $reactionId . '/', $payload);
        $body = $response->getBody()->getContents();
        return json_decode($body, true);
    }