File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Test/Unit/Model/Config/Source Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
7
+
6
8
namespace Magento \Cms \Model \Config \Source ;
7
9
8
10
use Magento \Cms \Model \ResourceModel \Block \CollectionFactory ;
11
+ use Magento \Framework \Data \OptionSourceInterface ;
9
12
10
13
/**
11
14
* Class Block
12
15
*/
13
- class Block implements \ Magento \ Framework \ Option \ArrayInterface
16
+ class Block implements OptionSourceInterface
14
17
{
15
18
/**
16
19
* @var array
17
20
*/
18
21
private $ options ;
19
22
20
23
/**
21
- * @var CollectionFactory
24
+ * @var \Magento\Cms\Model\ResourceModel\Block\ CollectionFactory
22
25
*/
23
26
private $ collectionFactory ;
24
27
25
28
/**
26
- * @param CollectionFactory $collectionFactory
29
+ * @param \Magento\Cms\Model\ResourceModel\Block\ CollectionFactory $collectionFactory
27
30
*/
28
31
public function __construct (
29
32
CollectionFactory $ collectionFactory
@@ -32,15 +35,14 @@ public function __construct(
32
35
}
33
36
34
37
/**
35
- * To option array
36
- *
37
- * @return array
38
+ * {@inheritdoc}
38
39
*/
39
40
public function toOptionArray ()
40
41
{
41
42
if (!$ this ->options ) {
42
43
$ this ->options = $ this ->collectionFactory ->create ()->toOptionIdArray ();
43
44
}
45
+
44
46
return $ this ->options ;
45
47
}
46
48
}
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
7
+
6
8
namespace Magento \Cms \Test \Unit \Model \Config \Source ;
7
9
8
10
/**
You can’t perform that action at this time.
0 commit comments