当前位置: 首页>>代码示例>>PHP>>正文


PHP Images::GetLink方法代码示例

本文整理汇总了PHP中Images::GetLink方法的典型用法代码示例。如果您正苦于以下问题:PHP Images::GetLink方法的具体用法?PHP Images::GetLink怎么用?PHP Images::GetLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Images的用法示例。


在下文中一共展示了Images::GetLink方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __get

 public function __get($strName)
 {
     switch ($strName) {
         case 'Name':
             return $this->Title;
         case 'IsMaster':
             return $this->IsMaster();
         case 'IsChild':
             return $this->IsChild();
         case 'IsIndependent':
             return $this->IsIndependent();
         case 'Slug':
             return $this->GetSlug();
         case 'Code':
             if ($this->IsChild()) {
                 if ($prod = $this->GetMaster()) {
                     return $prod->code;
                 }
             }
             return $this->code;
         case 'FkProductMaster':
             return $this->GetMaster();
         case 'InventoryDisplay':
             return $this->InventoryDisplay();
         case 'Family':
             if (isset($this->family)) {
                 return $this->family->family;
             } else {
                 return '';
             }
         case 'Class':
             if (isset($this->class)) {
                 return $this->class->class_name;
             } else {
                 return '';
             }
         case 'Url':
         case 'Link':
             return $this->getUrl();
         case 'SEOName':
             return $this->GetSEOName();
         case 'AbsoluteUrl':
             return $this->GetAbsoluteUrl();
         case 'AddToCartImage':
             return $this->GetImageLink(ImagesType::addtocartmodal);
         case 'ListingImage':
             return $this->GetImageLink(ImagesType::listing);
         case 'ListingImageAbsolute':
             return $this->GetImageLink(ImagesType::listing, true);
         case 'MiniImage':
             return $this->GetImageLink(ImagesType::mini);
         case 'MiniImageAbsolute':
             return $this->GetImageLink(ImagesType::mini, true);
         case 'MiniImageTag':
             return CHtml::image(Images::GetLink($this->image_id, ImagesType::mini));
         case 'PreviewImage':
             return $this->GetImageLink(ImagesType::preview);
         case 'PreviewImageAbsolute':
             return $this->GetImageLink(ImagesType::preview, true);
         case 'PreviewImageTag':
             return CHtml::image(Images::GetLink($this->image_id, ImagesType::preview));
         case 'SliderImage':
             return $this->GetImageLink(ImagesType::slider);
         case 'SliderImageAbsolute':
             return $this->GetImageLink(ImagesType::slider, true);
         case 'SliderImageTag':
             return CHtml::image(Images::GetLink($this->image_id, ImagesType::slider));
         case 'CategoryImage':
             return $this->GetImageLink(ImagesType::category);
         case 'CategoryImageAbsolute':
             return $this->GetImageLink(ImagesType::category, true);
         case 'CategoryImageTag':
             return CHtml::image(Images::GetLink($this->image_id, ImagesType::category));
         case 'PDetailImage':
             return $this->GetImageLink(ImagesType::pdetail);
         case 'PDetailImageAbsolute':
             return $this->GetImageLink(ImagesType::pdetail, true);
         case 'PDetailImageTag':
             return CHtml::image(Images::GetLink($this->image_id, ImagesType::pdetail));
         case 'SmallImage':
             return $this->GetImageLink(ImagesType::small);
         case 'SmallImageAbsolute':
             return $this->GetImageLink(ImagesType::small, true);
         case 'SmallImageTag':
             return CHtml::image(Images::GetLink($this->image_id, ImagesType::small));
         case 'Image':
             return $this->GetImageLink(ImagesType::normal);
         case 'ImageAbsolute':
             return $this->GetImageLink(ImagesType::normal, true);
         case 'ImageTag':
             return CHtml::image(Images::GetLink($this->image_id, ImagesType::normal));
         case 'OriginalCode':
             return $this->code;
         case 'SizeLabel':
             return _xls_get_conf('PRODUCT_SIZE_LABEL', _sp('Size'));
         case 'ColorLabel':
             return _xls_get_conf('PRODUCT_COLOR_LABEL', _sp('Color'));
         case 'PageTitle':
             return _xls_truncate($this->GetPageMeta('SEO_PRODUCT_TITLE'), 70);
         case 'PageDescription':
//.........这里部分代码省略.........
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:101,代码来源:Product.php

示例2: GetImageLink

 protected function GetImageLink($type)
 {
     return Images::GetLink($this->image_id, $type);
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:4,代码来源:Category.php

示例3: actionGetmatrixproduct

 /**
  * Ajax responder, when choosing a color from the dropdown, get product details to update page
  */
 public function actionGetmatrixproduct()
 {
     if (Yii::app()->request->isAjaxRequest === false) {
         return;
     }
     $id = Yii::app()->getRequest()->getParam('id');
     $strSize = Yii::app()->getRequest()->getParam('product_size');
     $strColor = Yii::app()->getRequest()->getParam('product_color');
     $objProduct = Product::LoadChildProduct($id, $strSize, $strColor);
     if ($objProduct instanceof Product) {
         $arrReturn['status'] = 'success';
         $arrReturn['id'] = $objProduct->id;
         $arrReturn['FormattedPrice'] = $objProduct->getMarkedUpPrice();
         $arrReturn['FormattedRegularPrice'] = $objProduct->SlashedPrice;
         $arrReturn['image_id'] = CHtml::image(Images::GetLink($objProduct->image_id, ImagesType::pdetail));
         $arrReturn['code'] = $objProduct->code;
         $arrReturn['title'] = $objProduct->Title;
         $arrReturn['InventoryDisplay'] = $objProduct->InventoryDisplay;
         $arrReturn['FormattedSavingsAmount'] = $objProduct->getFormattedSavingsAmount();
         $arrReturn['FormattedSavingsPercentage'] = $objProduct->getFormattedSavingsPercentage();
         if ($objProduct->WebLongDescription) {
             $arrReturn['description_long'] = $objProduct->WebLongDescription;
         } else {
             $arrReturn['description_long'] = $objProduct->parent0->WebLongDescription;
         }
         if ($objProduct->description_short) {
             $arrReturn['description_short'] = $objProduct->WebShortDescription;
         } else {
             $arrReturn['description_short'] = $objProduct->parent0->WebShortDescription;
         }
         Yii::app()->clientscript->scriptMap['jquery.js'] = false;
         $arrReturn['photos'] = $this->renderPartial('/product/_photos', array('model' => $objProduct), true, false);
     } else {
         // options are missing so return the master product
         $objProduct = Product::model()->findByPk($id);
         $arrReturn['FormattedPrice'] = $objProduct->getFormattedSlashedPrice();
         $arrReturn['FormattedRegularPrice'] = $objProduct->SlashedPrice;
         $arrReturn['FormattedSavingsAmount'] = $objProduct->getFormattedSavingsAmount();
         $arrReturn['FormattedSavingsPercentage'] = $objProduct->getFormattedSavingsPercentage();
         $arrReturn['code'] = $objProduct->code;
         $arrReturn['title'] = $objProduct->Title;
         $arrReturn['InventoryDisplay'] = $objProduct->InventoryDisplay;
         if ($objProduct->WebLongDescription) {
             $arrReturn['description_long'] = $objProduct->WebLongDescription;
         }
         if ($objProduct->description_short) {
             $arrReturn['description_short'] = $objProduct->WebShortDescription;
         }
         $arrReturn['photos'] = $this->renderPartial('/product/_photos', array('model' => $objProduct), true, false);
     }
     echo json_encode($arrReturn);
 }
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:55,代码来源:ProductController.php

示例4: getUploadPhotoFeed

    public function getUploadPhotoFeed($objProduct)
    {
        $url = Images::GetLink($objProduct->image_id, ImagesType::normal, true);
        //If our URL is schema-less, prepend schema so Amazon is happy
        if (substr($url, 0, 2) == '//') {
            $url = "http:" . $url;
        }
        $strFeed = '<?xml version="1.0" encoding="utf-8" ?>
			<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amznenvelope.xsd">
				<Header>
					<DocumentVersion>1.01</DocumentVersion>
					<MerchantIdentifier>' . $this->MerchantID . '</MerchantIdentifier>
				</Header>
				<MessageType>ProductImage</MessageType>
				<Message>
					<MessageID>1</MessageID>
					<OperationType>Update</OperationType>
					<ProductImage>
						 <SKU>' . $objProduct->code . '</SKU>
						<ImageType>Main</ImageType>
						<ImageLocation>' . $url . '</ImageLocation>
					</ProductImage>
				</Message>
			</AmazonEnvelope>';
        Yii::log("Created photo feed " . $strFeed, 'info', 'application.' . __CLASS__ . "." . __FUNCTION__);
        return $strFeed;
    }
开发者ID:hjlan,项目名称:webstore,代码行数:27,代码来源:wsamazon.php


注:本文中的Images::GetLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。