Skip to content

Commit 22d36e9

Browse files
authored
Merge pull request #96 from magento-trigger/PB-api
[Team 3] Mark code with api annotation
2 parents 6299646 + fe324c1 commit 22d36e9

File tree

248 files changed

+777
-139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+777
-139
lines changed

app/code/Magento/PageBuilder/Block/Adminhtml/ContentType/Edit/CancelButton.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010

1111
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
1212

13+
/**
14+
* Cancel button on edit panel for Content Type
15+
*
16+
* @api
17+
*/
1318
class CancelButton implements ButtonProviderInterface
1419
{
1520
/**

app/code/Magento/PageBuilder/Block/Adminhtml/ContentType/Edit/CloseButton.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
1111

12+
/**
13+
* Close button on edit panel for Content Type
14+
*
15+
* @api
16+
*/
1217
class CloseButton implements ButtonProviderInterface
1318
{
1419
/**
@@ -31,7 +36,7 @@ public function __construct(string $targetName)
3136
*
3237
* @return array
3338
*/
34-
public function getButtonData()
39+
public function getButtonData() : array
3540
{
3641
return [
3742
'label' => __('Close'),

app/code/Magento/PageBuilder/Block/Adminhtml/ContentType/Edit/ResetButton.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\PageBuilder\Block\Adminhtml\ContentType\Edit;
79

810
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
911

12+
/**
13+
* Reset button on edit panel for Content Type
14+
*
15+
* @api
16+
*/
1017
class ResetButton implements ButtonProviderInterface
1118
{
1219
/**
1320
* Retrieve button data
1421
*
1522
* @return array
1623
*/
17-
public function getButtonData()
24+
public function getButtonData() : array
1825
{
1926
return [
2027
'label' => __('Reset'),

app/code/Magento/PageBuilder/Block/Adminhtml/ContentType/Edit/SaveButton.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\PageBuilder\Block\Adminhtml\ContentType\Edit;
79

810
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
911

12+
/**
13+
* Save button on edit panel for Content Type
14+
*
15+
* @api
16+
*/
1017
class SaveButton implements ButtonProviderInterface
1118
{
1219
/**
1320
* Retrieve button data
1421
*
1522
* @return array
1623
*/
17-
public function getButtonData()
24+
public function getButtonData() : array
1825
{
1926
return [
2027
'label' => __('Save'),

app/code/Magento/PageBuilder/Block/Adminhtml/Form/Element/ProductConditions.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
/**
1414
* The block used to render the conditions rule tree form within the PageBuilder interface.
15+
*
16+
* @api
1517
*/
1618
class ProductConditions extends Template
1719
{

app/code/Magento/PageBuilder/Block/Adminhtml/System/Config/EnableField.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\PageBuilder\Block\Adminhtml\System\Config;
89

910
use Magento\Framework\Data\Form\Element\AbstractElement;
1011

12+
/**
13+
* Class EnableField renders modal window if disable PB in System Configuration
14+
*
15+
* @api
16+
*/
1117
class EnableField extends \Magento\Config\Block\System\Config\Form\Field
1218
{
1319
/**
@@ -51,9 +57,9 @@ protected function _getElementHtml(AbstractElement $element)
5157
/**
5258
* Get text for the modal title heading when user switches to disable
5359
*
54-
* @return string
60+
* @return \Magento\Framework\Phrase
5561
*/
56-
private function getModalTitleText()
62+
private function getModalTitleText() : \Magento\Framework\Phrase
5763
{
5864
return __('Are You Sure You Want to Turn Off Page Builder?');
5965
}

app/code/Magento/PageBuilder/Block/Adminhtml/System/Config/Form/Field/GoogleMapsApiKey.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
namespace Magento\PageBuilder\Block\Adminhtml\System\Config\Form\Field;
99

10+
/**
11+
* @api
12+
*/
1013
class GoogleMapsApiKey extends \Magento\Config\Block\System\Config\Form\Field
1114
{
1215
/**

app/code/Magento/PageBuilder/Block/Adminhtml/System/Config/SwitchAttributeType.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
namespace Magento\PageBuilder\Block\Adminhtml\System\Config;
1010

11+
/**
12+
* Class SwitchAttributeType renders modal window to confirm changing attribute type
13+
*
14+
*/
1115
class SwitchAttributeType extends \Magento\Config\Block\System\Config\Form\Field
1216
{
1317
/**
@@ -26,17 +30,17 @@ public function __construct(
2630
*
2731
* @return string
2832
*/
29-
public function getModalSelector()
33+
public function getModalSelector() : string
3034
{
3135
return '#frontend_input';
3236
}
3337

3438
/**
3539
* Get text for the modal title heading when user switches to disable
3640
*
37-
* @return string
41+
* @return \Magento\Framework\Phrase
3842
*/
39-
public function getModalTitleText()
43+
public function getModalTitleText() : \Magento\Framework\Phrase
4044
{
4145
return __('Product data may be lost');
4246
}
@@ -46,7 +50,7 @@ public function getModalTitleText()
4650
*
4751
* @return string
4852
*/
49-
public function getModalContentBody()
53+
public function getModalContentBody() :string
5054
{
5155
$content = __("Changing the Input Type may result in product data loss. Proceed with caution.");
5256
return '<div class="pagebuilder-modal-content-body">' . $content . '</div>';

app/code/Magento/PageBuilder/Block/ContentType/Block.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\PageBuilder\Block\ContentType;
79

10+
/**
11+
* @api
12+
*/
813
class Block extends \Magento\Cms\Block\Block
914
{
1015
/**

app/code/Magento/PageBuilder/Block/ContentType/Newsletter.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)