-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from cloudinary/v1.17.0
V1.17.0
- Loading branch information
Showing
35 changed files
with
358 additions
and
1,541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Cloudinary\Cloudinary\Model\Config\Source\Dropdown; | ||
|
||
use Magento\Framework\Data\OptionSourceInterface; | ||
|
||
class FreeTransformBehavior implements OptionSourceInterface | ||
{ | ||
public function toOptionArray() | ||
{ | ||
return [ | ||
[ | ||
'value' => 'add', | ||
'label' => 'Add', | ||
], | ||
[ | ||
'value' => 'override', | ||
'label' => 'Override', | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
declare(strict_types=1); | ||
namespace Cloudinary\Cloudinary\Model\GraphQLResolver; | ||
|
||
use Magento\Framework\GraphQl\Config\Element\Field; | ||
use Magento\Framework\GraphQl\Query\ResolverInterface; | ||
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; | ||
use Cloudinary\Cloudinary\Model\Api\ProductGalleryManagement; | ||
use Magento\Framework\GraphQl\Type\Definition\ObjectType; | ||
|
||
/** | ||
* Class ProductAttributeCldResolver | ||
**/ | ||
class ProductAttributeCldResolver implements ResolverInterface | ||
{ | ||
/** | ||
* @var ProductGalleryManagement | ||
*/ | ||
private $productGalleryManagement; | ||
|
||
/** | ||
* ProductAttributeCldResolver constructor. | ||
* @param ProductGalleryManagement $productGalleryManagement | ||
*/ | ||
public function __construct( | ||
ProductGalleryManagement $productGalleryManagement | ||
) { | ||
$this->productGalleryManagement = $productGalleryManagement; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) | ||
{ | ||
$productId = $value['sku']; | ||
$productMediaStr = $this->productGalleryManagement->getProductMedia($productId); | ||
$jsonDecoder = new \Magento\Framework\Serialize\Serializer\Json(); | ||
$productMedia = $jsonDecoder->unserialize($productMediaStr); | ||
return $productMedia['data']; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type CloudinaryData { | ||
image: String | ||
small_image: String | ||
thumbnail: String | ||
media_gallery: [String] | ||
} | ||
|
||
interface ProductInterface { | ||
cld_data: CloudinaryData | ||
@resolver(class: "\\Cloudinary\\Cloudinary\\Model\\GraphQLResolver\\ProductAttributeCldResolver") | ||
@doc(description: "Cloudinary urls generated for product images") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
{ | ||
"name": "cloudinary/cloudinary", | ||
"description": "Cloudinary Magento 2 Integration.", | ||
"type": "magento2-module", | ||
"version": "1.16.1", | ||
"license": "MIT", | ||
"require": { | ||
"cloudinary/cloudinary_php": "^1.20.0" | ||
}, | ||
"autoload": { | ||
"files": [ | ||
"registration.php" | ||
], | ||
"psr-4": { | ||
"Cloudinary\\Cloudinary\\": "" | ||
} | ||
"name": "cloudinary/cloudinary", | ||
"description": "Cloudinary Magento 2 Integration.", | ||
"type": "magento2-module", | ||
"version": "1.17.0", | ||
"license": "MIT", | ||
"require": { | ||
"cloudinary/cloudinary_php": "^1.20.0" | ||
}, | ||
"autoload": { | ||
"files": [ | ||
"registration.php" | ||
], | ||
"psr-4": { | ||
"Cloudinary\\Cloudinary\\": "" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
view/adminhtml/ui_component/pagebuilder_base_form_with_background_video.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd" extends="pagebuilder_base_form_with_background_attributes"> | ||
<fieldset name="background"> | ||
<field name="video_source"> | ||
<settings> | ||
<tooltip> | ||
<description translate="true">Video URLs can be links to videos on YouTube, Vimeo or Cloudinary, or HTTP(S) links to files with valid video extensions (we recommend .mp4)</description> | ||
</tooltip> | ||
</settings> | ||
</field> | ||
</fieldset> | ||
</form> |
Oops, something went wrong.