src/WidgetsCollection.php 1 location
|
@@ 10-22 (lines=13) @@
|
7 |
|
/** |
8 |
|
* A collection of entity browser widgets. |
9 |
|
*/ |
10 |
|
class WidgetsCollection extends DefaultLazyPluginCollection { |
11 |
|
|
12 |
|
/** |
13 |
|
* Provides uasort() callback to sort plugins. |
14 |
|
*/ |
15 |
|
public function sortHelper($a, $b) { |
16 |
|
$weight_a = $this->get($a)->getWeight(); |
17 |
|
$weight_b = $this->get($b)->getWeight(); |
18 |
|
|
19 |
|
return $weight_a < $weight_b ? -1 : 1; |
20 |
|
} |
21 |
|
|
22 |
|
} |
23 |
|
|
src/WidgetsLazyPluginCollection.php 1 location
|
@@ 10-22 (lines=13) @@
|
7 |
|
/** |
8 |
|
* A collection of entity browser widgets. |
9 |
|
*/ |
10 |
|
class WidgetsLazyPluginCollection extends DefaultLazyPluginCollection { |
11 |
|
|
12 |
|
/** |
13 |
|
* Provides uasort() callback to sort plugins. |
14 |
|
*/ |
15 |
|
public function sortHelper($a, $b) { |
16 |
|
$weight_a = $this->get($a)->getWeight(); |
17 |
|
$weight_b = $this->get($b)->getWeight(); |
18 |
|
|
19 |
|
return $weight_a < $weight_b ? -1 : 1; |
20 |
|
} |
21 |
|
|
22 |
|
} |
23 |
|
|