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

Commit 0c9ea1b

Browse files
authored
Merge branch 'master' into guzzle-http-page
2 parents f15c098 + 77955af commit 0c9ea1b

File tree

15 files changed

+610
-180
lines changed

15 files changed

+610
-180
lines changed

src/_data/toc/configuration-guide.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -286,25 +286,6 @@ pages:
286286
- label: Configure the database profiler
287287
url: /config-guide/db-profiler/db-profiler.html
288288

289-
- label: Install and configure Elasticsearch (Magento Commerce only)
290-
url: /config-guide/elasticsearch/es-overview.html
291-
children:
292-
293-
- label: Configure nginx and Elasticsearch
294-
url: /config-guide/elasticsearch/es-config-nginx.html
295-
296-
- label: Configure Apache and Elasticsearch
297-
url: /config-guide/elasticsearch/es-config-apache.html
298-
299-
- label: Configure Elasticsearch stopwords
300-
url: /config-guide/elasticsearch/es-config-stopwords.html
301-
302-
- label: Configure Magento to use Elasticsearch
303-
url: /config-guide/elasticsearch/configure-magento.html
304-
305-
- label: Change the Elasticsearch client
306-
url: /config-guide/elasticsearch/es-downgrade.html
307-
308289
- label: Install and configure Elasticsearch
309290
url: /config-guide/elasticsearch/es-overview.html
310291
children:

src/_data/toc/marketplace-api.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ pages:
2121
url: /marketplace/eqp/v1/packages.html
2222
versionless: true
2323

24+
- label: Test results
25+
url: /marketplace/eqp/v1/test-results.html
26+
versionless: true
27+
2428
- label: Reports
2529
url: /marketplace/eqp/v1/reports.html
2630
versionless: true
@@ -29,3 +33,6 @@ pages:
2933
url: /marketplace/eqp/v1/filtering.html
3034
versionless: true
3135

36+
- label: API callbacks
37+
url: /marketplace/eqp/v1/callbacks.html
38+
versionless: true

src/_data/toc/ui-components-guide.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ pages:
103103
- label: Form component
104104
url: /ui_comp_guide/components/ui-form.html
105105

106+
- label: FormDataProvider component
107+
url: /ui_comp_guide/components/ui-form-data-provider.html
108+
106109
- label: GridDataProvider component
107110
url: /ui_comp_guide/components/ui-grid-data-provider.html
108111

src/cloud/project/ece-tools-upgrade-project.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ To upgrade project to use ece-tools:
6262
hooks:
6363
# We run build hooks before your application has been packaged.
6464
build: |
65-
php ./vendor/bin/ece-tools build
65+
set -e
66+
php ./vendor/bin/ece-tools build:generate
67+
php ./vendor/bin/ece-tools build:transfer
6668
# We run deploy hook after your application has been deployed and started.
6769
deploy: |
6870
php ./vendor/bin/ece-tools deploy

src/cloud/project/project-conf-files_magento-app.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ Add CLI commands under the `build`, `deploy`, or `post_deploy` sections _before_
217217
hooks:
218218
# We run build hooks before your application has been packaged.
219219
build: |
220-
php ./vendor/bin/ece-tools build
220+
set -e
221+
php ./vendor/bin/ece-tools build:generate
222+
php ./vendor/bin/ece-tools build:transfer
221223
# We run deploy hook after your application has been deployed and started.
222224
deploy: |
223225
php ./vendor/bin/ece-tools deploy
-2.55 KB
Loading

src/guides/v2.3/config-guide/cron/custom-cron-ref.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,36 @@ where:
109109
| `history_failure_lifetime` | Time (in minutes) that the record of failed cron jobs are kept in the database. |
110110
| `use_separate_process` | Run this crongroup's jobs in a separate php process |
111111

112+
## Disable a cron job {#disable-cron-job}
113+
114+
Cron jobs do not have a `disable` feature like we have for [observers]({{ page.baseurl }}/extension-dev-guide/events-and-observers.html#subscribing-to-events). However, a cron job can be disabled by using the following technique: `schedule` a time that contains a date which will never happen.
115+
116+
For example, disable the `visitor_clean` cron job which defined in `Magento_Customer` module:
117+
118+
```xml
119+
...
120+
<group id="default">
121+
<job name="visitor_clean" instance="Magento\Customer\Model\Visitor" method="clean">
122+
<schedule>0 0 * * *</schedule>
123+
</job>
124+
</group>
125+
...
126+
```
127+
128+
To disable the `visitor_clean` cron job, create a custom module and rewrite the `visitor_clean` cron job `schedule`:
129+
130+
```xml
131+
...
132+
<group id="default">
133+
<job name="visitor_clean" instance="Magento\Customer\Model\Visitor" method="clean">
134+
<schedule>0 0 30 2 *</schedule>
135+
</job>
136+
</group>
137+
...
138+
```
139+
140+
Now, the `visitor_clean` cron job has been set to run at 00:00 on the 30th of February - at the date which will never occur.
141+
112142
{:.ref-header}
113143
Related topic
114144
[Tutorial---configure custom cron jobs and cron groups]({{ page.baseurl }}/config-guide/cron/custom-cron-tut.html)

src/guides/v2.3/graphql/product/customizable-option-interface.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ Attribute | Type | Description
205205

206206
The following query returns information about the customizable options configured for the product with a `sku` of `xyz`.
207207

208-
```text
208+
**Request:**
209+
210+
```graphql
209211
{
210212
products(filter: {sku: {eq: "xyz"}}) {
211213
items {
@@ -225,3 +227,30 @@ The following query returns information about the customizable options configure
225227
}
226228
}
227229
```
230+
231+
**Response:**
232+
233+
```json
234+
{
235+
"data": {
236+
"products": {
237+
"items": [
238+
{
239+
"id": 1,
240+
"name": "T-shirt",
241+
"sku": "xyz",
242+
"__typename": "SimpleProduct",
243+
"options": [
244+
{
245+
"title": "Image",
246+
"required": false,
247+
"sort_order": 1,
248+
"option_id": 1
249+
}
250+
]
251+
}
252+
]
253+
}
254+
}
255+
}
256+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
group: ui-components-guide
3+
title: FormDataProvider component
4+
contributor_name: Atwix
5+
contributor_link: https://www.atwix.com/
6+
---
7+
8+
The FormDataProvider [UI component](https://glossary.magento.com/ui-component) is a data provider for the [Form]({{ page.baseurl }}/ui_comp_guide/components/ui-form.html) component. It stores form data in a specific format that is shared among all UI components in the scope of [Form]({{ page.baseurl }}/ui_comp_guide/components/ui-form.html) component and provides the functionality for submitting the data.
9+
10+
## Configuration options
11+
12+
| Option | Description | Type | Default Value |
13+
| --- | --- | --- | --- |
14+
| `class` | Path to the [PHP](https://glossary.magento.com/php) class responsible for the [backend](https://glossary.magento.com/backend) implementation of the component | String | `Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider` |
15+
| `component` | The path to the component's `.js` file, relative to RequireJS. | String | `Magento_Ui/js/form/provider` |
16+
| `clientConfig` | Configuration of the [FormClient]({{ site.mage2bloburl }}/{{page.guide_version}}/app/code/Magento/Ui/view/base/web/js/form/client.js) component. | Object | `urls: {save: '${ $.submit_url }',beforeSave: '${ $.validate_url }'}` |
17+
| `submit_url` | Path to controller that will process the form data submitting request. | String | `-` |
18+
| `validate_url` | Path to controller that will process the form data validation request. | String | `-` |
19+
20+
## Sources files
21+
22+
Extends [`UiElement`]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_uielement_concept.html):
23+
24+
- [app/code/Magento/Ui/view/base/web/js/form/provider.js]({{ site.mage2bloburl }}/{{page.guide_version}}/app/code/Magento/Ui/view/base/web/js/form/provider.js)
25+
26+
## Examples
27+
28+
### Integrate the FormDataProvider component with the Form component
29+
30+
This is an example of how the FormDataProvider component integrates with the [Form]({{ page.baseurl }}/ui_comp_guide/components/ui-form.html) component:
31+
32+
```xml
33+
<form>
34+
<dataSource name="sales_rule_form_data_source">
35+
<argument name="data" xsi:type="array">
36+
<item name="js_config" xsi:type="array">
37+
<item name="component" xsi:type="string">Magento_Ui/js/form/provider</item>
38+
</item>
39+
</argument>
40+
<settings>
41+
<submitUrl path="path/to/submit_form_data_controller"/>
42+
<validateUrl path="path/to/validate_form_data_controller"/>
43+
</settings>
44+
</dataSource>
45+
</form>
46+
```

src/marketplace/eqp/v1/callbacks.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
group: marketplace-api
3+
title: API callbacks
4+
---
5+
6+
The multiple steps of the EQP process take time to complete. The results of these steps can impact the availability or status of data that was previously submitted.
7+
Rather than having to continuously poll for updates, you can register an API callback URL in the user profile.
8+
9+
{:.bs-callout-info}
10+
API Callback URLs can only be registered through the API.
11+
12+
Whenever an update occurs to a product or a file, a JSON API request will be sent to the registered callback URL.
13+
14+
## Register a callback
15+
16+
Callbacks are registered using the [User Profile](users.html) API.
17+
18+
|Field|Type|Description|
19+
|-------------|-----|-----------------|
20+
|name|string|Optional: name for this callback|
21+
|url|string|URL that will receive callback JSON requests|
22+
|username|string|Basic authorization username|
23+
|password|string|Basic authorization password - never returned in the GET response|
24+
25+
**Request:**
26+
27+
```bash
28+
curl -X PUT \
29+
-H 'Authorization: Bearer baGXoStRuR9VCDFQGZNzgNqbqu5WUwlr.cAxZJ9m22Le7' \
30+
-H 'Content-Type: application/json' \
31+
-d '{"api_callbacks": [{"name": "My 1st EQP Callback","url": "https://developer.example.com/rest/v1/callback","username": "key","password": "secret"}]}' \
32+
https://developer-stg-api.magento.com/rest/v1/users/MAG123456789
33+
```
34+
35+
**Response:**
36+
37+
```json
38+
{
39+
...
40+
"api_callbacks": [
41+
{
42+
"name": "My 1st EQP Callback",
43+
"url": "https://developer.example.com/rest/v1/callback",
44+
"username": "key"
45+
}
46+
],
47+
...
48+
}
49+
```
50+
51+
## Authentication
52+
53+
API callbacks are authenticated using a Basic Authorization header.
54+
Callbacks are only sent using HTTPS to ensure the security and integrity of the request.
55+
56+
For the callback registered in the example above, the following
57+
header will be constructed and sent in every callback request:
58+
59+
```http
60+
Authorization: Basic a2V5OnNlY3JldA==
61+
```
62+
63+
## Callback structures
64+
65+
Each event has a unique code provided in the `callback_event` field.
66+
The `update_info` object has a different structure, depending on the event code.
67+
Resource IDs are provided in the `update_info` structure so that additional
68+
information can be requested using the REST APIs for those resources.
69+
70+
### File upload callbacks
71+
72+
Malware scan results are sent out for [File](files.html) resources when the asynchronous scan completes.
73+
74+
```json
75+
{
76+
"callback_event": "malware_scan_complete",
77+
"update_info": {
78+
"file_upload_id": "2309480238.238475.0",
79+
"tool_result": "passed"
80+
}
81+
}
82+
```
83+
84+
### Package callbacks
85+
86+
EQP status updates are sent out for [Package](packages.html) resources when the product's EQP state is modified.
87+
88+
```json
89+
{
90+
"callback_event": "eqp_status_update",
91+
"update_info": {
92+
"submission_id": "s5w9k703ru",
93+
"item_id": "user_upload_version_1",
94+
"eqp_flow": "marketing",
95+
"current_status": "approved"
96+
}
97+
}
98+
```

0 commit comments

Comments
 (0)