本文整理汇总了PHP中Library\Utility\Helper::getVideoUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::getVideoUrl方法的具体用法?PHP Helper::getVideoUrl怎么用?PHP Helper::getVideoUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Library\Utility\Helper
的用法示例。
在下文中一共展示了Helper::getVideoUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getApartment
public function getApartment($cityApartel)
{
$cityApartel = explode('--', $cityApartel);
if (!isset($cityApartel[1]) || !ClassicValidator::checkApartmentTitle($cityApartel[0]) || !ClassicValidator::checkApartmentTitle($cityApartel[1])) {
return false;
}
$apartel = $otherParams['apartel'] = $cityApartel[0];
$city = $cityApartel[1];
$generalDao = $this->getApartmentGeneralDao();
$descrDao = $this->getDescriptionDao();
$roomDao = $this->getRoomDao();
$officeDao = new \DDD\Dao\Office\OfficeManager($this->getServiceLocator());
$furnitureDao = $this->getFurnitureDao();
$apartmentAmenitiesDao = $this->getAmenitiesDao();
$buildingFacilitiesDao = $this->getFacilitiesDao();
$general = $generalDao->getApartmentGeneralBySlug($apartel, Helper::urlForSearch($city, TRUE));
if (!$general) {
return false;
}
//change currency
$userCurrency = $this->getCurrencySite();
if ($userCurrency != $general['code']) {
$currencyResult = $this->currencyConvert($general['price_avg'], $userCurrency, $general['code']);
$general['price_avg'] = $currencyResult[0];
$general['symbol'] = $currencyResult[1];
}
//images
$imgDomain = DomainConstants::IMG_DOMAIN_NAME;
$imgPath = Website::IMAGES_PATH;
$images = [];
$checkHasImage = false;
foreach ($general as $key => $img) {
if (strpos($key, 'img') !== false && $img) {
$original = Helper::getImgByWith($img);
$smallImg = Helper::getImgByWith($img, WebSite::IMG_WIDTH_AMARTMENT_SMALL);
$bigImg = Helper::getImgByWith($img, WebSite::IMG_WIDTH_AMARTMENT_BIG);
if ($original && $bigImg && $smallImg) {
$checkHasImage = true;
$images[] = ['domain' => $imgDomain, 'big' => $bigImg, 'small' => $smallImg, 'orig' => $original];
}
}
}
if (!$checkHasImage) {
$noImg = Constants::VERSION . 'img/no_image.png';
$images[] = ['domain' => $noImg, 'big' => $noImg, 'small' => $noImg, 'orig' => $noImg];
}
$otherParams['images'] = $images;
//video
if (isset($general['video']) && $general['video']) {
$video = Helper::getVideoUrl($general['video']);
if ($video) {
$otherParams['video'] = ['video_screen' => $video, 'src' => $general['video']];
}
}
//facilities
$tempFacilitiesData = $buildingFacilitiesDao->getApartmentBuildingFacilities($general['aprtment_id']);
$facilities = [];
foreach ($tempFacilitiesData as $tempFacility) {
$facilities[$tempFacility->getFacilityName()] = $tempFacility->getFacilityTextlineId();
}
unset($tempFacilitiesData);
//amenities
$tempAmenitiesData = $apartmentAmenitiesDao->getApartmentAmenities($general['aprtment_id']);
$amenities = [];
foreach ($tempAmenitiesData as $tempAmenity) {
$amenities[$tempAmenity->getAmenityName()] = $tempAmenity->getAmenityTextlineId();
}
unset($tempAmenitiesData);
if (isset($facilities['Parking']) && $facilities['Parking']) {
$otherParams['parking'] = true;
}
if (isset($amenitiesData['Free Wifi']) && $amenitiesData['Free Wifi']) {
$otherParams['internet'] = true;
}
//furniture
$furnitureData = $furnitureDao->getFurnitureLits($general['aprtment_id']);
$otherParams['furnitures'] = $furnitureData;
/* @var $websiteSearchService \DDD\Service\Website\Search */
$websiteSearchService = $this->getServiceLocator()->get('service_website_search');
$diffHours = $websiteSearchService->getDiffHoursForDate();
$otherParams['current'] = Helper::getCurrenctDateByTimezone($general['timezone'], 'd-m-Y', $diffHours);
$general['city_name'] = $general['city_name'];
$general['city_slug'] = $general['city_slug'];
$otherParams['guestList'] = Objects::getGuestList(['guest' => $this->getTextLineSite(1455), 'guests' => $this->getTextLineSite(1456)], true);
$params = ['general' => $general, 'amenities' => $amenities, 'facilities' => $facilities, 'otherParams' => $otherParams];
return $params;
}