當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Contacts::getAssetContacts方法代碼示例

本文整理匯總了PHP中Contacts::getAssetContacts方法的典型用法代碼示例。如果您正苦於以下問題:PHP Contacts::getAssetContacts方法的具體用法?PHP Contacts::getAssetContacts怎麽用?PHP Contacts::getAssetContacts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Contacts的用法示例。


在下文中一共展示了Contacts::getAssetContacts方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getRentDemandProcesses

 public static function getRentDemandProcesses($rentDemandID)
 {
     global $db;
     $processes = $db->select('rentProcesses', '*', ['rentDemand' => $rentDemandID]);
     $ans = [];
     foreach ($processes as $process) {
         $process['assetName'] = Assets::getAsset($process['asset'])['name'];
         $assetContacts = Contacts::getAssetContacts($process['asset']);
         if (!empty($assetContacts)) {
             $process['assetContact'] = $assetContacts[0]['fullName'];
             $process['assetPhone'] = $assetContacts[0]['mobilePhone'];
         }
         array_push($ans, $process);
     }
     return $ans;
 }
開發者ID:AnyApp,項目名稱:-Commercial-System,代碼行數:16,代碼來源:rentProcesses.php

示例2: setCalculatedFields

 private static function setCalculatedFields($asset)
 {
     $asset['totalArea'] = RentAreas::getAssetTotalRentAreas($asset['id']);
     $asset['available'] = RentAreas::getAssetTotalAvailableRentAreas($asset['id']);
     $asset['populatePercentage'] = $asset['totalArea'] == 0 ? 0 : number_format($asset['available'] / $asset['totalArea'] * 100, 2);
     $contacts = Contacts::getAssetContacts($asset['id']);
     if (count($contacts)) {
         $firstContact = $contacts[0];
         $asset['assetContact'] = $firstContact['fullName'];
         $asset['contactPhone'] = $firstContact['mobilePhone'];
     }
     $asset['alive'] = RentProcesses::getAssetTotalRentProcessesWithStatus($asset['id'], 'חי');
     $asset['closed'] = RentProcesses::getAssetTotalRentProcessesWithStatus($asset['id'], 'סגור');
     $asset['failed'] = RentProcesses::getAssetTotalRentProcessesWithStatus($asset['id'], 'נכשל');
     $asset['picture'] = $asset['floorPicture'];
     return $asset;
 }
開發者ID:AnyApp,項目名稱:-Commercial-System,代碼行數:17,代碼來源:assets.php

示例3: function

    }
});
$this->respond(['GET', 'POST'], '/get/[i:id]', function ($request, $response, $service, $app) {
    $id = $request->param('id');
    $assetData = Assets::getAsset($id);
    $assetInvestors = Investors::getAssetInvestors($id);
    $result = array("assetData" => $assetData, "assetInvestors" => $assetInvestors);
    if ($assetData) {
        $response->json(Result::success('', $result));
    } else {
        $response->json(Result::error('Asset not found'));
    }
});
$this->respond(['GET', 'POST'], '/get-for-edit/[i:id]', function ($request, $response, $service, $app) {
    $id = $request->param('id');
    $assetData = Assets::getAsset($id);
    $assetContacts = Contacts::getAssetContacts($id);
    $assetInvestors = Investors::getAssetInvestors($id);
    $assetAreas = RentAreas::getAssetRentAreas($id);
    $assetProcesses = RentProcesses::getAssetRentProcesses($id);
    $result = array("assetData" => $assetData, "assetContacts" => $assetContacts, "assetInvestors" => $assetInvestors, "assetAreas" => $assetAreas, "assetProcesses" => $assetProcesses);
    if ($assetData) {
        $response->json(Result::success('', $result));
    } else {
        $response->json(Result::error('Asset not found'));
    }
});
$this->respond(['GET', 'POST'], '/get/all', function ($request, $response, $service, $app) {
    $result = Assets::getAllAssets();
    $response->json(Result::success('', $result));
});
開發者ID:AnyApp,項目名稱:-Commercial-System,代碼行數:31,代碼來源:assets-rent.php


注:本文中的Contacts::getAssetContacts方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。