Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function remove_sites() |
||
38 | { |
||
39 | $config_text = $this->container->get('config_text'); |
||
40 | $stored_sites = json_decode($config_text->get('media_embed_sites'), true); |
||
41 | |||
42 | $configurator = $this->container->get('text_formatter.s9e.factory')->get_configurator(); |
||
43 | $available_sites = array_keys(iterator_to_array($configurator->MediaEmbed->defaultSites)); |
||
44 | |||
45 | return json_encode(array_values(array_intersect($stored_sites, $available_sites))); |
||
46 | } |
||
47 | } |
||
48 |