This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ProductType): add inputTip to attribute definition
- Loading branch information
Jens Schulze
committed
Mar 9, 2016
1 parent
32d182f
commit 09288a4
Showing
3 changed files
with
56 additions
and
0 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
52 changes: 52 additions & 0 deletions
52
src/Request/ProductTypes/Command/ProductTypeSetInputTipAction.php
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,52 @@ | ||
<?php | ||
/** | ||
* @author @jayS-de <jens.schulze@commercetools.de> | ||
*/ | ||
|
||
namespace Commercetools\Core\Request\ProductTypes\Command; | ||
|
||
use Commercetools\Core\Model\Common\Context; | ||
use Commercetools\Core\Model\Common\LocalizedString; | ||
use Commercetools\Core\Request\AbstractAction; | ||
|
||
/** | ||
* @package Commercetools\Core\Request\ProductTypes\Command | ||
* @link http://dev.commercetools.com/http-api-projects-productTypes.html#set-attribute-definition-inputtip | ||
* @method string getAction() | ||
* @method ProductTypeSetInputTipAction setAction(string $action = null) | ||
* @method string getAttributeName() | ||
* @method ProductTypeSetInputTipAction setAttributeName(string $attributeName = null) | ||
* @method LocalizedString getInputTip() | ||
* @method ProductTypeSetInputTipAction setInputTip(LocalizedString $inputTip = null) | ||
*/ | ||
class ProductTypeSetInputTipAction extends AbstractAction | ||
{ | ||
public function fieldDefinitions() | ||
{ | ||
return [ | ||
'action' => [static::TYPE => 'string'], | ||
'attributeName' => [static::TYPE => 'string'], | ||
'inputTip' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'] | ||
]; | ||
} | ||
|
||
/** | ||
* @param array $data | ||
* @param Context|callable $context | ||
*/ | ||
public function __construct(array $data = [], $context = null) | ||
{ | ||
parent::__construct($data, $context); | ||
$this->setAction('setInputTip'); | ||
} | ||
|
||
/** | ||
* @param string $attributeName | ||
* @param Context|callable $context | ||
* @return static | ||
*/ | ||
public static function ofAttributeName($attributeName, $context = null) | ||
{ | ||
return static::of($context)->setAttributeName($attributeName); | ||
} | ||
} |
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