Conditions | 4 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
19 | public function elementPageChanged($object, $doc) { |
||
20 | if($object->hasMethod('ElementArea')) { |
||
21 | $dirty = array(); |
||
22 | |||
23 | foreach($object->ElementArea()->WidgetControllers() as $element) { |
||
24 | $doc->addField(self::ELEMENTAL_FIELD_NAME . '_ID', $element->ID); |
||
25 | |||
26 | // if this page has virtual clones on another page make sure that we also update the Solr index for |
||
27 | // those pages automatically. |
||
28 | foreach($element->VirtualClones() as $clone) { |
||
29 | $dirty[$clone->ID] = $clone->ID; |
||
30 | } |
||
31 | } |
||
32 | } |
||
33 | |||
34 | $this->publishDirtyClones($dirty); |
||
35 | } |
||
36 | |||
46 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.