| @@ 60-69 (lines=10) @@ | ||
| 57 | /** |
|
| 58 | * {@inheritdoc} |
|
| 59 | */ |
|
| 60 | public function __sleep() { |
|
| 61 | // Instead of serializing the referenced plugin, we just serialize the |
|
| 62 | // plugin id and configuration. |
|
| 63 | $this->plugin = [ |
|
| 64 | 'id' => $this->plugin->getPluginId(), |
|
| 65 | 'configuration' => $this->plugin instanceof ConfigurablePluginInterface ? $this->plugin->getConfiguration() : [], |
|
| 66 | ]; |
|
| 67 | ||
| 68 | return array_keys(get_object_vars($this)); |
|
| 69 | } |
|
| 70 | ||
| 71 | } |
|
| 72 | ||
| @@ 76-86 (lines=11) @@ | ||
| 73 | /** |
|
| 74 | * {@inheritdoc} |
|
| 75 | */ |
|
| 76 | public function __sleep() { |
|
| 77 | // Instead of serializing the referenced plugin, we just serialize the |
|
| 78 | // plugin id and configuration. |
|
| 79 | $this->plugin = [ |
|
| 80 | 'id' => $this->plugin->getPluginId(), |
|
| 81 | 'type' => $this->plugin->getPluginDefinition()['pluginType'], |
|
| 82 | 'configuration' => $this->plugin instanceof ConfigurablePluginInterface ? $this->plugin->getConfiguration() : [], |
|
| 83 | ]; |
|
| 84 | ||
| 85 | return array_keys(get_object_vars($this)); |
|
| 86 | } |
|
| 87 | ||
| 88 | } |
|