Skip to content

Commit f67beb3

Browse files
authored
Merge pull request #416 from hbugdoll/patch-1
Updated source code comments of PhpBlockView
2 parents 75a2afe + 222e3bb commit f67beb3

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/base/PhpBlockView.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
*
1111
* @property PhpBlock $context Get the block context.
1212
* @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.
1414
* @property boolean $isFirst Whether this is the first block element inside this placeholder or not.
1515
* @property boolean $isLast Whether this is the last block element inside this placeholder or not.
1616
* @property integer $itemsCount Returns the number of items inside this placeholder.
1717
* @property boolean $isNextEqual Whether the next element (the element after the current element) is the same or not.
1818
* @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 number within the equal elements.
19+
* @property integer $equalIndex Get the current index number/position of this element within the list of *same* elements.
2020
* @property integer $id Returns the Unique ID for this block (absolute unique value).
2121
* @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.
2323
* @property View $appView The application view object in order to register data to the layout view.
2424
*
2525
* @author Basil Suter <basil@nadar.io>
@@ -156,11 +156,11 @@ public function getBlockId()
156156
}
157157

158158
/**
159-
* Returns the {{luya\cms\models\NavItem}} context Page Object.
159+
* Returns the context {{luya\cms\models\NavItemPage}} object.
160160
*
161161
* Returns the context page object where the block is implemented.
162162
*
163-
* @return \luya\cms\models\NavItem
163+
* @return \luya\cms\models\NavItemPage
164164
* @since 1.0.2
165165
*/
166166
public function getPageObject()
@@ -171,17 +171,17 @@ public function getPageObject()
171171
/**
172172
* Get a block environment value.
173173
*
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
175175
* + **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()`.
178178
* + **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.
181181
* + **itemsCount**: Returns the number of items inside this placeholder.
182182
* + **isPrevEqual**: Returns whether the previous item is of the same origin (block type, like text block) as the current.
183183
* + **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.
185185
*
186186
* @param string $key The key identifier of the context variable.
187187
* @param mixed $defaultvalue If the env value is not found this value will be returned.

0 commit comments

Comments
 (0)