| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function initializeContext(Context $context) { |
||
| 26 | |||
| 27 | // All contexts are passed here, only DrupalAwareInterface is allowed. |
||
| 28 | if (!$context instanceof DrupalAwareInterface) { |
||
| 29 | return; |
||
| 30 | } |
||
| 31 | |||
| 32 | // Set Drupal driver manager. |
||
| 33 | $context->setDrupal($this->drupal); |
||
| 34 | |||
| 35 | // Set event dispatcher. |
||
| 36 | $context->setDispatcher($this->dispatcher); |
||
| 37 | |||
| 38 | // Add all parameters to the context. |
||
| 39 | $context->setDrupalParameters($this->parameters); |
||
| 40 | } |
||
| 41 | |||
| 43 |