File tree Expand file tree Collapse file tree 3 files changed +28
-6
lines changed Expand file tree Collapse file tree 3 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 5
5
use luya \cms \base \BlockInterface ;
6
6
use luya \cms \frontend \blockgroups \DevelopmentGroup ;
7
7
8
- class ConcretImplementationBlock implements BlockInterface
8
+ class ConcreteImplementationBlock implements BlockInterface
9
9
{
10
10
public function onRegister ()
11
11
{
@@ -94,6 +94,28 @@ public function getFieldHelp()
94
94
return [];
95
95
}
96
96
97
+ private $ _page ;
98
+
99
+ /**
100
+ * Set the block's {{luya\cms\models\NavItemPage}} object.
101
+ *
102
+ * @param NavItemPage $page The page object.
103
+ */
104
+ public function setPage ($ page )
105
+ {
106
+ $ this ->_page = $ page ;
107
+ }
108
+
109
+ /**
110
+ * Returns the block's {{luya\cms\models\NavItemPage}} object.
111
+ *
112
+ * @return NavItemPage
113
+ */
114
+ public function getPage ()
115
+ {
116
+ return $ this ->_page ;
117
+ }
118
+
97
119
private $ _envs = [];
98
120
99
121
/**
Original file line number Diff line number Diff line change 8
8
9
9
class InternalBaseBlockTest extends CmsFrontendTestCase
10
10
{
11
- public function testConcretImplementation ()
11
+ public function testConcreteImplementation ()
12
12
{
13
- $ object = new ConcretImplementationBlock ();
13
+ $ object = new ConcreteImplementationBlock ();
14
14
15
15
$ this ->assertInstanceOf ('luya\cms\base\BlockInterface ' , $ object );
16
16
}
Original file line number Diff line number Diff line change 3
3
namespace cmstests \src \base ;
4
4
5
5
use cmstests \CmsFrontendTestCase ;
6
- use cmstests \data \blocks \ConcretImplementationBlock ;
6
+ use cmstests \data \blocks \ConcreteImplementationBlock ;
7
7
use cmstests \data \blocks \PhpTestBlock ;
8
8
use luya \cms \base \PhpBlockView ;
9
9
use luya \web \View ;
@@ -127,11 +127,11 @@ public function testRegisterAssetBundles()
127
127
128
128
public function testGetBlock ()
129
129
{
130
- $ block = new ConcretImplementationBlock ();
130
+ $ block = new ConcreteImplementationBlock ();
131
131
$ view = new PhpBlockView ();
132
132
$ view ->context = $ block ;
133
133
134
- $ this ->assertInstanceOf (ConcretImplementationBlock ::class, $ view ->getBlock ());
134
+ $ this ->assertInstanceOf (ConcreteImplementationBlock ::class, $ view ->getBlock ());
135
135
}
136
136
137
137
public function testGetters ()
You can’t perform that action at this time.
0 commit comments