| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function getMyBlocks() { |
||
| 15 | $mySegment = ltrim($this->owner->Link(), '/' ); |
||
| 16 | $mySegment = rtrim($mySegment, '/'); |
||
| 17 | $mySegment = strlen($mySegment) == 0 || $mySegment == 'home' ? '<home>' : $mySegment; |
||
| 18 | $blocks = Block::get()->filter(array( |
||
| 19 | 'ExcludeListed' => false, |
||
| 20 | 'UrlsRegExps' => $mySegment |
||
| 21 | ))->sort('SortOrder', 'ASC'); |
||
| 22 | |||
| 23 | return $blocks; |
||
| 24 | } |
||
| 25 | |||
| 32 | } |