Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Small changes #6059

Merged
merged 31 commits into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
21bda85
Fixed incorrect syntax for custom KO checked binding
drpayyne Nov 17, 2019
f1b649a
Added missing example for i18n Magento binding syntax
drpayyne Nov 17, 2019
56ec4a3
Incorrect reference url fixed
nidheesh-eglobeits Nov 18, 2019
92cf577
Fixing the LESS snippet syntax
rafaelstz Nov 18, 2019
888a6c4
Merge branch 'master' into patch-52
rafaelstz Nov 18, 2019
13767c8
Merge branch 'master' into patch-52
dobooth Nov 18, 2019
38a2bd1
Merge pull request #6018 from rafaelstz/patch-52
dobooth Nov 18, 2019
19cb2cd
Merge branch 'master' into reference-name-correction
dobooth Nov 18, 2019
a291d2f
Merge pull request #6017 from nidheesh-eglobeits/reference-name-corre…
dobooth Nov 18, 2019
9ed252f
Merge branch 'master' into patch-47
dobooth Nov 18, 2019
9284b23
Merge pull request #6015 from drpayyne/patch-47
dobooth Nov 18, 2019
cd4ee69
Merge branch 'master' into patch-48
dobooth Nov 18, 2019
58f87ad
Merge pull request #6016 from drpayyne/patch-48
dobooth Nov 18, 2019
a23c4bf
Adding question mark when nullable value is declared
rodrigowebjump Nov 19, 2019
ab590c7
Adding nullable param question mark in v2.2
rodrigowebjump Nov 19, 2019
0dbedbe
magento/devdocs#5632: Incorrect link to JSCS site.
atwixfirster Nov 20, 2019
f381a1f
Merge master
dobooth Nov 20, 2019
a3967a2
Merge pull request #6033 from rodrigowebjump/patch-7
dobooth Nov 20, 2019
efa4684
Merge branch 'master' into issue-5632
dobooth Nov 20, 2019
83f16a4
Merge master
dobooth Nov 20, 2019
cc20452
Merge pull request #6040 from atwixfirster/issue-5632
dobooth Nov 20, 2019
ef255a2
magento/devdocs#: Add customerOrders query API errors
atwixfirster Nov 20, 2019
1200a12
magento/devdocs#: Add customerDownloadableProducts query API errors
atwixfirster Nov 20, 2019
7b3c9aa
Merge branch 'master' into api-errors-customerDownloadableProducts
dobooth Nov 21, 2019
2f2d1be
Merge master
dobooth Nov 21, 2019
a564435
Merge pull request #6051 from atwixfirster/api-errors-customerDownloa…
dobooth Nov 21, 2019
f2dc3a5
Merge branch 'master' into api-errors-customerOrders
dobooth Nov 21, 2019
9aecc6c
Merge pull request #6049 from atwixfirster/api-errors-customerOrders
dobooth Nov 21, 2019
3d6746c
Update view-models.md
Nov 21, 2019
74b2aa5
Merge master
dobooth Nov 22, 2019
c6d9c27
Merge pull request #6053 from DeoJr/patch-1
dobooth Nov 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions guides/v2.2/architecture/archi_perspectives/service_layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ Related topics
* [Architectural diagrams]({{page.baseurl}}/architecture/archi_perspectives/arch_diagrams.html)
* [Architectural layers overview]({{page.baseurl}}/architecture/archi_perspectives/ALayers_intro.html)

[catalog-api]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Customer/Api
[catalog-api-data]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Customer/Api/Data
[catalog-api]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Catalog/Api
[catalog-api-data]: {{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Catalog/Api/Data
3 changes: 1 addition & 2 deletions guides/v2.2/coding-standards/code-standard-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For the jQuery widget coding standard, see [jQuery widget coding standard][jquer

## Eslint and JSCS tools

Use [ESLint][eslint] and [JSCS][jscs] to ensure the quality of your JavaScript code.
Use [ESLint][eslint] and `JSCS` to ensure the quality of your JavaScript code.

ESLint is a community-driven tool that detects errors and potential problems in JavaScript code.
It can use custom rules to enforce specific coding standards.
Expand Down Expand Up @@ -359,6 +359,5 @@ var foo = 'bar',
[jquery-widgets]: http://api.jqueryui.com/category/widgets
[jquery-widget-coding-standard]: {{ page.baseurl }}/coding-standards/code-standard-jquery-widgets.html
[eslint]: http://eslint.org/
[jscs]: http://jscs.info/
[eslint-rules]: {{ site.mage2bloburl }}/{{ page.guide_version }}/dev/tests/static/testsuite/Magento/Test/Js/_files/eslint/.eslintrc-magento
[jscs-rules]: {{ site.mage2bloburl }}/{{ page.guide_version }}/dev/tests/static/testsuite/Magento/Test/Js/_files/jscs/.jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ Add a new optional parameter to the constructor at the end of the arguments list

In the constructor body, if the new dependency is not provided (i.e. the value of the introduced argument is `null`), fetch the dependency using `Magento\Framework\App\ObjectManager::getInstance()`.

Prefix the type name with a question mark when declaring a parameter with a `null` default value.

{% collapsible Example Code %}

```php
Expand All @@ -134,7 +136,7 @@ class ExistingClass
\Old\Dependency\Interface $oldDependency,
$oldRequiredConstructorParameter,
$oldOptionalConstructorParameter = null,
\New\Dependency\Interface $newDependency = null
?\New\Dependency\Interface $newDependency = null
) {
...
$this->newDependency = $newDependency ?: \Magento\Framework\App\ObjectManager::getInstance()->get(\New\Dependency\Interface::class);
Expand Down
15 changes: 8 additions & 7 deletions guides/v2.2/extension-dev-guide/view-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ The following example shows how to add functionality to a core template with cus
```xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="checkout.cart.item.renderers.default">
<arguments>
<argument name="view_model" xsi:type="object">Vendor\CustomModule\ViewModel\MyClass</argument>
</arguments>
</referenceBlock>
</body>
<body>
<referenceBlock name="checkout.cart.item.renderers.default">
<arguments>
<argument name="view_model" xsi:type="object">Vendor\CustomModule\ViewModel\MyClass</argument>
</arguments>
</referenceBlock>
</body>
</page>
```

You must implement the right interface in your `view_model` class (for example `ArgumentInterface`):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ To include a 3rd party library and use it within the entire website (using the [

1. Copy `slick.less` and `slick-theme.less` to the `<theme_path>/web/css/source` folder. Also add both files to `<theme_path>/web/css/source/_extend.less`.

```less
```scss
@import "slick.less";
@import "slick-theme.less";
```
Expand Down
4 changes: 3 additions & 1 deletion guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ The `i18n` binding is used to translate a string according to the currently enab
**Usage example**:

```html
<div data-bind="i18n: 'Translate as a standard knockout binding'"></div>
<!-- ko i18n: 'Translate using the virtual element' --><!-- /ko -->

<div data-bind="i18n: 'Translate using the standard knockout binding'"></div>

<div translate="'Translate using the attribute'"></div>

Expand Down
4 changes: 2 additions & 2 deletions guides/v2.2/ui_comp_guide/concepts/magento-bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ The table below shows examples of how the Knockout bindings map to their Magento
|textInput |`<input data-bind="textInput: value"/>` | `<input textInput="value"/>` |
|value |`<input data-bind="value: value"/>` | `<input ko-value="value"/>` |
|checked |`<input type="checkbox" data-bind="checked: isChecked"/>` | `<input type="checkbox" ko-checked="isChecked"/>` |
| |`<input type="radio" data-bind="value: value,checked: isSelected" />` | `<input type="radio" ko-checked="element.isSelected" ko-value="value" />` |
|checkedValue |`<input type="checkbox" data-bind="checkedValue: $data, checked: isChecked"/>` | `<input type="checkbox" checkedValue="$data" checked="isChecked"/>` |
| |`<input type="radio" data-bind="value: value, checked: isSelected" />` | `<input type="radio" ko-checked="element.isSelected" ko-value="value" />` |
|checkedValue |`<input type="checkbox" data-bind="checkedValue: $data, checked: isChecked"/>` | `<input type="checkbox" checkedValue="$data" ko-checked="isChecked"/>` |
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ Add a new optional parameter to the constructor at the end of the arguments list

In the constructor body, if the new dependency is not provided (i.e. the value of the introduced argument is `null`), fetch the dependency using `Magento\Framework\App\ObjectManager::getInstance()`.

Prefix the type name with a question mark when declaring a parameter with a `null` default value.

{% collapsible Example Code %}

```php
Expand All @@ -140,7 +142,7 @@ class ExistingClass
\Old\Dependency\Interface $oldDependency,
$oldRequiredConstructorParameter,
$oldOptionalConstructorParameter = null,
\New\Dependency\Interface $newDependency = null
?\New\Dependency\Interface $newDependency = null
) {
...
$this->newDependency = $newDependency ?: \Magento\Framework\App\ObjectManager::getInstance()->get(\New\Dependency\Interface::class);
Expand Down
6 changes: 6 additions & 0 deletions guides/v2.3/graphql/queries/customer-downloadable-products.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ Attribute | Type | Description
`order_increment_id` | String | The purchase order ID
`remaining_downloads` | String | Determines the number of times the customer can download the product
`status` | String | Determines the stage in the order workflow when the download becomes available. Options are `Pending` and `Invoiced`

## Errors

Error | Description
--- | ---
`The current customer isn't authorized.` | The current customer is not currently logged in, or the customer's token does not exist in the `oauth_token` table.
6 changes: 6 additions & 0 deletions guides/v2.3/graphql/queries/customer-orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,9 @@ Attribute | Data type | Description
`id` | Int | The ID assigned to the customer's order
`increment_id` | String | An ID that indicates the sequence of the order in the customer's order history
`status` | String | The status of the order, such as `open`, `processing`, or `closed`

## Errors

Error | Description
--- | ---
`The current customer isn't authorized.` | The current customer is not currently logged in, or the customer's token does not exist in the `oauth_token` table.