当前位置: 首页>>代码示例>>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;未经允许,请勿转载。