Skip to content

Commit 4302f84

Browse files
author
Maxim Medinskiy
committed
Merge remote-tracking branch 'origin/MAGETWO-28154' into BUGS
2 parents 0280dfc + 0f7361f commit 4302f84

File tree

50 files changed

+2102
-1779
lines changed

Some content is hidden

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

50 files changed

+2102
-1779
lines changed

app/code/Magento/Catalog/Model/Category/Attribute/Source/Page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
namespace Magento\Catalog\Model\Category\Attribute\Source;
77

8-
use Magento\Cms\Model\Resource\Block\Grid\CollectionFactory;
8+
use Magento\Cms\Model\Resource\Block\CollectionFactory;
99

1010
/**
1111
* Catalog category landing page attribute source

app/code/Magento/Catalog/Model/Resource/Category/Attribute/Source/Page.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ class Page extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
1515
/**
1616
* Block collection factory
1717
*
18-
* @var \Magento\Cms\Model\Resource\Block\Grid\CollectionFactory
18+
* @var \Magento\Cms\Model\Resource\Block\CollectionFactory
1919
*/
2020
protected $_blockCollectionFactory;
2121

2222
/**
2323
* Construct
2424
*
25-
* @param \Magento\Cms\Model\Resource\Block\Grid\CollectionFactory $blockCollectionFactory
25+
* @param \Magento\Cms\Model\Resource\Block\CollectionFactory $blockCollectionFactory
2626
*/
27-
public function __construct(\Magento\Cms\Model\Resource\Block\Grid\CollectionFactory $blockCollectionFactory)
27+
public function __construct(\Magento\Cms\Model\Resource\Block\CollectionFactory $blockCollectionFactory)
2828
{
2929
$this->_blockCollectionFactory = $blockCollectionFactory;
3030
}

app/code/Magento/Catalog/Test/Unit/Model/Category/Attribute/Source/PageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private function getMockedBlockCollectionFactory()
4545
{
4646
$mockedCollection = $this->getMockedCollection();
4747

48-
$mockBuilder = $this->getMockBuilder('Magento\Cms\Model\Resource\Block\Grid\CollectionFactory');
48+
$mockBuilder = $this->getMockBuilder('Magento\Cms\Model\Resource\Block\CollectionFactory');
4949
$mock = $mockBuilder->setMethods(['create'])
5050
->disableOriginalConstructor()
5151
->getMock();
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Cms\Api;
7+
8+
use Magento\Framework\Api\SearchCriteriaInterface;
9+
10+
/**
11+
* CMS block CRUD interface.
12+
*/
13+
interface BlockRepositoryInterface
14+
{
15+
/**
16+
* Save block.
17+
*
18+
* @param Data\BlockInterface $block
19+
* @return Data\BlockInterface
20+
* @throws \Magento\Framework\Exception\LocalizedException
21+
*/
22+
public function save(Data\BlockInterface $block);
23+
24+
/**
25+
* Retrieve block.
26+
*
27+
* @param int $blockId
28+
* @return Data\BlockInterface
29+
* @throws \Magento\Framework\Exception\LocalizedException
30+
*/
31+
public function getById($blockId);
32+
33+
/**
34+
* Retrieve blocks matching the specified criteria.
35+
*
36+
* @param SearchCriteriaInterface $searchCriteria
37+
* @return \Magento\Framework\Api\SearchResultsInterface
38+
* @throws \Magento\Framework\Exception\LocalizedException
39+
*/
40+
public function getList(SearchCriteriaInterface $searchCriteria);
41+
42+
/**
43+
* Delete block.
44+
*
45+
* @param Data\BlockInterface $block
46+
* @return bool true on success
47+
* @throws \Magento\Framework\Exception\LocalizedException
48+
*/
49+
public function delete(Data\BlockInterface $block);
50+
51+
/**
52+
* Delete block by ID.
53+
*
54+
* @param int $blockId
55+
* @return bool true on success
56+
* @throws \Magento\Framework\Exception\NoSuchEntityException
57+
* @throws \Magento\Framework\Exception\LocalizedException
58+
*/
59+
public function deleteById($blockId);
60+
}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Cms\Api\Data;
7+
8+
/**
9+
* CMS block interface.
10+
*/
11+
interface BlockInterface
12+
{
13+
/**#@+
14+
* Constants for keys of data array. Identical to the name of the getter in snake case
15+
*/
16+
const BLOCK_ID = 'block_id';
17+
const IDENTIFIER = 'identifier';
18+
const TITLE = 'title';
19+
const CONTENT = 'content';
20+
const CREATION_TIME = 'creation_time';
21+
const UPDATE_TIME = 'update_time';
22+
const IS_ACTIVE = 'is_active';
23+
/**#@-*/
24+
25+
/**
26+
* Get ID
27+
*
28+
* @return int
29+
*/
30+
public function getId();
31+
32+
/**
33+
* Get identifier
34+
*
35+
* @return string
36+
*/
37+
public function getIdentifier();
38+
39+
/**
40+
* Get title
41+
*
42+
* @return string
43+
*/
44+
public function getTitle();
45+
46+
/**
47+
* Get content
48+
*
49+
* @return string
50+
*/
51+
public function getContent();
52+
53+
/**
54+
* Get creation time
55+
*
56+
* @return string
57+
*/
58+
public function getCreationTime();
59+
60+
/**
61+
* Get update time
62+
*
63+
* @return string
64+
*/
65+
public function getUpdateTime();
66+
67+
/**
68+
* Is active
69+
*
70+
* @return bool
71+
*/
72+
public function isActive();
73+
74+
/**
75+
* Set ID
76+
*
77+
* @param int $id
78+
* @return BlockInterface
79+
*/
80+
public function setId($id);
81+
82+
/**
83+
* Set identifier
84+
*
85+
* @param string $identifier
86+
* @return BlockInterface
87+
*/
88+
public function setIdentifier($identifier);
89+
90+
/**
91+
* Set title
92+
*
93+
* @param string $title
94+
* @return BlockInterface
95+
*/
96+
public function setTitle($title);
97+
98+
/**
99+
* Set content
100+
*
101+
* @param string $content
102+
* @return BlockInterface
103+
*/
104+
public function setContent($content);
105+
106+
/**
107+
* Set creation time
108+
*
109+
* @param string $creationTime
110+
* @return BlockInterface
111+
*/
112+
public function setCreationTime($creationTime);
113+
114+
/**
115+
* Set update time
116+
*
117+
* @param string $updateTime
118+
* @return BlockInterface
119+
*/
120+
public function setUpdateTime($updateTime);
121+
122+
/**
123+
* Set is active
124+
*
125+
* @param bool|int $isActive
126+
* @return BlockInterface
127+
*/
128+
public function setIsActive($isActive);
129+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Cms\Api\Data;
7+
8+
use Magento\Framework\Api\SearchResultsInterface;
9+
10+
/**
11+
* Interface for cms block search results.
12+
*/
13+
interface BlockSearchResultsInterface extends SearchResultsInterface
14+
{
15+
/**
16+
* Get blocks list.
17+
*
18+
* @return \Magento\Cms\Api\Data\BlockInterface[]
19+
*/
20+
public function getItems();
21+
22+
/**
23+
* Set blocks list.
24+
*
25+
* @param \Magento\Cms\Api\Data\BlockInterface[] $items
26+
* @return $this
27+
*/
28+
public function setItems(array $items = null);
29+
}

0 commit comments

Comments
 (0)