Get Summary.

@param int $location_id
Location ID.
@param string $membership_id
Membership type ID.

@return string
Price.
168452
public function getSummary($location_id, $membership_id) {
    $storage = $this->entityTypeManager->getStorage('node');
    $builder = $this->entityTypeManager->getViewBuilder('node');
    $location = $storage->load($location_id);
    $result['location'] = $builder->view($location, 'calc_summary');
    $membership = $storage->load($membership_id);
    $result['membership'] = $builder->view($membership, 'calc_summary');

    $info = $membership->field_mbrshp_info->referencedEntities();
    $defaultUrl = Url::fromRoute('<front>');
    foreach ($info as $value) {
      if (!empty($value->field_mbrshp_location->first()) && $value->field_mbrshp_location->first()->get('target_id')->getValue() == $location_id) {
        $result['price']['monthly_rate'] = $value->field_mbrshp_monthly_rate->value;
        $result['price']['join_fee'] = $value->field_mbrshp_join_fee->value;
        $result['link'] = !empty($value->field_mbrshp_link->first()) ? $value->field_mbrshp_link->first()->getUrl() : $defaultUrl;
      }
    }

    return $result;
  }
1354106
function get_group($group_id)
    {
        $sql_result = $this->db->query(
            "SELECT * FROM " . $this->db->table_name($this->db_groups, true)
            . " WHERE `del` <> 1 AND `contactgroup_id` = ? AND `user_id` = ?",
            $group_id, $this->user_id);

        if ($sql_result && ($sql_arr = $this->db->fetch_assoc($sql_result))) {
            $sql_arr['ID'] = $sql_arr['contactgroup_id'];
            return $sql_arr;
        }

        return null;
    }
132681
public function getLastVersion($page_id)
	{
		$qb = $this->createQueryBuilder('p');
		
		$qb->where('p.original=:page_id')
			->orderBy('p.createdAt', 'DESC')
			->setParameter(':page_id', $page_id);
		
		$result = $qb->getQuery()->setMaxResults(1)->getResult();

		if ( is_null($result) ) {
			$qb2 = $this->createQueryBuilder('p');
			$qb2->where('p.id=:page_id')->setParameter(':page_id', $page_id);
			
			$result = $qb->getQuery()->getResult();
		}
		
		return $result[0];
	}
620593
public function getAccountHiPay(
        $account_id
    ) {
        $this->resetRestClient();

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-user',
            $this->login
        );

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-pw',
            $this->password
        );

        if (!empty($account_id)) {
            $this->restClient->getConfig()->setPath(
                'request.options/headers/php-auth-subaccount-id',
                $account_id
            );
        }

        $command = $this->restClient->getCommand(
            'GetUserAccount',
            array()
        );

        $result = $this->executeRest($command);

        return $result;
    }
1191121
protected function getTitle( $post_id ) {
		$title = get_the_title( $post_id );
		if ( empty( $title ) ) {
			$title = get_bloginfo( 'name' );
		}
		return $title;
	}
164794
public function getTransactionContent(int $character_id, int $client_id)
    {

        $transactions = $this->characterWalletTransactionInteraction($character_id, $client_id);

        return DataTables::of($transactions)
            ->editColumn('is_buy', function ($row) {

                return view('web::partials.transactionbuysell', compact('row'));
            })
            ->editColumn('unit_price', function ($row) {

                return number($row->unit_price);
            })
            ->addColumn('item_view', function ($row) {
                return view('web::partials.transactiontype', compact('row'));
            })
            ->addColumn('total', function ($row) {

                return number($row->unit_price * $row->quantity);
            })
            ->addColumn('client_view', function ($row) {

                $character_id = $row->character_id;

                $character = CharacterInfo::find($row->client_id) ?: $row->client_id;

                return view('web::partials.character', compact('character', 'character_id'));
            })
            ->rawColumns(['is_buy', 'client_view', 'item_view'])
            ->make(true);
    }
79480
public function internationalDestination($country_id = NULL) {
        $params = (is_null($country_id)) ? array() : array('id' => $country_id);
        $rest_client = new RESTClient($this->api_key, 'internationalDestination', $this->account_type);
        return $rest_client->get($params);
    }
29230
public function get($order_id)
    {
        $result = null;
        $this->hook->attach('order.get.before', $order_id, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $conditions = array(
            'limit' => array(0, 1),
            'order_id' => $order_id
        );

        $list = (array) $this->getList($conditions);
        $result = empty($list) ? array() : reset($list);

        $this->setCart($result);
        $this->hook->attach('order.get.after', $order_id, $result, $this);
        return $result;
    }
100975
public function getChargeById($myshopify, $token, $id)
    {
        $this->setRequestPath($myshopify);

        $url = $this->getChargeEndpoint(). '/' . $id . '.json';

        $response = $this->getHttpClient()->get($url,
        [
            'headers' => $this->getResponseHeaders($token)
        ]);

        return json_decode($response->getBody(), true);
    }
959097
public function voidTransaction($location_id, $transaction_id)
    {
        list($response, $statusCode, $httpHeader) = $this->voidTransactionWithHttpInfo ($location_id, $transaction_id);
        return $response; 
    }
1170877
function photos_geo_getLocation($photo_id)
    {
        /** http://www.flickr.com/services/api/flickr.photos.geo.getLocation.html */
        $this->request("flickr.photos.geo.getLocation", array("photo_id"=>$photo_id));
        return $this->parsed_response ? $this->parsed_response['photo'] : false;
    }
661253
public function payGetOrder($order_id)
    {
        $url = "https://api.weixin.qq.com/card/pay/getorder?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['order_id' => $order_id]);
    }
52884
public function getClientDetails($client_id)
    {
        $result = $this->collection('client_table')->findOne(array('client_id' => $client_id));
        return is_null($result) ? false : $result;
    }
345028
public function getPlugin($plugin_id) {
    $cart = $this->getCart();
    $paymentMethodManager = \Drupal::service('plugin.manager.acm_payment_method');
    return $paymentMethodManager->createInstance($plugin_id, [], $cart);
  }
746944
function _get_subscription( $license_id ) {
            if ( ! isset( $this->_storage->subscriptions ) ||
                 empty( $this->_storage->subscriptions )
            ) {
                return null;
            }

            foreach ( $this->_storage->subscriptions as $subscription ) {
                if ( $subscription->license_id == $license_id ) {
                    return $subscription;
                }
            }

            return null;
        }
410458
public function getMethodReturnTypeLocation(
        $method_id,
        CodeLocation &$defined_location = null
    ) {
        return $this->methods->getMethodReturnTypeLocation($method_id, $defined_location);
    }
48988
public function getProgramsByLocation($location_id) {
    $cid = __METHOD__ . $location_id;
    if ($cache = $this->cache->get($cid)) {
      return $cache->data;
    }

    $data = $this->client->getPrograms(['branch' => $location_id]);

    $this->cache->set($cid, $data);
    return $data;
  }