Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
15 | public function getDockedBlocks() { |
||
16 | $blocks = Block::get()->filter('showBlockbyClass', true); |
||
17 | $blocks_map = $blocks->map('ID', 'shownInClass'); |
||
18 | foreach ($blocks_map as $blockID => $Classes) { |
||
19 | $Classes = explode(',', $Classes); |
||
20 | if (!in_array($this->owner->ClassName, $Classes)) { |
||
21 | $blocks = $blocks->exclude('ID', $blockID); |
||
22 | } |
||
23 | } |
||
24 | |||
25 | return $blocks->sort('SortOrder', 'ASC'); |
||
26 | } |
||
27 | } |