You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/base/PhpBlockView.php
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -10,16 +10,16 @@
10
10
*
11
11
* @property PhpBlock $context Get the block context.
12
12
* @property PhpBlock $block The block context.
13
-
* @property integer $index Get the current index number of the block inside the current placeholder.
13
+
* @property integer $index Get the current index number/position of the block within this placeholder.
14
14
* @property boolean $isFirst Whether this is the first block element inside this placeholder or not.
15
15
* @property boolean $isLast Whether this is the last block element inside this placeholder or not.
16
16
* @property integer $itemsCount Returns the number of items inside this placeholder.
17
17
* @property boolean $isNextEqual Whether the next element (the element after the current element) is the same or not.
18
18
* @property boolean $isPrevEqual Whether the previous element (the element before the current element) is the same or not.
19
-
* @property integer $equalIndex Get the index numberwithin the equal elements.
19
+
* @property integer $equalIndex Get the current index number/position of this element within the list of *same* elements.
20
20
* @property integer $id Returns the Unique ID for this block (absolute unique value).
21
21
* @property integer $blockId Returns the block type ID from database, assume two text blocks would have the same ID.
22
-
* @property \luya\cms\models\NavItem $pageObject Returns the NavItem object for the context the block is implemented.
22
+
* @property \luya\cms\models\NavItemPage $pageObject Returns the `NavItemPage` object where the block is located.
23
23
* @property View $appView The application view object in order to register data to the layout view.
24
24
*
25
25
* @author Basil Suter <basil@nadar.io>
@@ -156,11 +156,11 @@ public function getBlockId()
156
156
}
157
157
158
158
/**
159
-
* Returns the {{luya\cms\models\NavItem}} context Page Object.
159
+
* Returns the context {{luya\cms\models\NavItemPage}} object.
160
160
*
161
161
* Returns the context page object where the block is implemented.
162
162
*
163
-
* @return \luya\cms\models\NavItem
163
+
* @return \luya\cms\models\NavItemPage
164
164
* @since 1.0.2
165
165
*/
166
166
publicfunctiongetPageObject()
@@ -171,17 +171,17 @@ public function getPageObject()
171
171
/**
172
172
* Get a block environment value.
173
173
*
174
-
* + **id**: Return the unique identifier for this block, each blocks has its id from the database, this is absolute unique. {{luya\cms\models\NavItemPageBlockItem}} -> id
174
+
* + **id**: Returns the unique identifier for this block, each blocks has its id from the database, this is absolute unique. {{luya\cms\models\NavItemPageBlockItem}} -> id
175
175
* + **blockId**: Returns the id of the block in the database. Two blocks of the same type would have the same blockId. {{luya\cms\models\Block}} -> id
176
-
* + **context**: Returns frontend or backend to find out in which context you are.
177
-
* + **pageObject**: Returns the {{luya\cms\models\NavItem}} Object where you can run `getNav()` to retrievew the Nav Object.
176
+
* + **context**: Returns `frontend` or `admin` to find out in which context you are.
177
+
* + **pageObject**: Returns the {{luya\cms\models\NavItemPage}} object where the block is located. Thereof you can also retrieve the related {{luya\cms\models\NavItem}} and {{luya\cms\models\Nav}} objects via `getNavItem()` and `getNav()`.
178
178
* + **isFirst**: Returns whether this block is the first in its placeholder or not.
179
-
* + **isLast**: Return whether his block is the last in its placeholder or not.
180
-
* + **index**: Returns the number of the index/position within this placheholder.
179
+
* + **isLast**: Returns whether this block is the last in its placeholder or not.
180
+
* + **index**: Returns the index number/position within this placeholder.
181
181
* + **itemsCount**: Returns the number of items inside this placeholder.
182
182
* + **isPrevEqual**: Returns whether the previous item is of the same origin (block type, like text block) as the current.
183
183
* + **isNextEqual**: Returns whether the next item is of the same origin (block type, like text block) as the current.
184
-
* + **equalIndex**: Get the current index/position of this element within the list of *same* elements.
184
+
* + **equalIndex**: Returns the current index number/position of this element within the list of *same* elements.
185
185
*
186
186
* @param string $key The key identifier of the context variable.
187
187
* @param mixed $defaultvalue If the env value is not found this value will be returned.
0 commit comments