Skip to content

Commit

Permalink
Merge pull request #23 from Chris53897/feature/remove-templateing
Browse files Browse the repository at this point in the history
feat: remove "symfony/templating"
  • Loading branch information
bresam authored Feb 21, 2024
2 parents 5d1ea55 + 94e5deb commit af23b17
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 669 deletions.
1 change: 0 additions & 1 deletion DependencyInjection/IvoryGoogleMapExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ protected function loadInternal(array $mergedConfig, ContainerBuilder $container
'helper/renderer',
'helper/subscriber',
'helper/utility',
'templating',
'twig',
];

Expand Down
41 changes: 0 additions & 41 deletions Resources/config/templating.xml

This file was deleted.

19 changes: 0 additions & 19 deletions Resources/doc/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,3 @@ The available Twig functions are:
- `ivory_google_map_css`: Renders the map stylesheet.

**Don't forget to always render the Google API loading after rendering your map.**

### Php

If you're using the PHP templating engine, then, the most easy way to render a map is:

``` php
<?php echo $view['ivory_google_map']->render($map) ?>
<?php echo $view['ivory_google_api']->render([$map]) ?>
```

The available helper methods are:

- `ivory_google_api::render`: Renders the Google API loading.
- `ivory_google_map::render`: Renders the map container + javascript + stylesheet.
- `ivory_google_map::renderHtml`: Renders the map container.
- `ivory_google_map::renderJavascript`: Renders the map javascript.
- `ivory_google_map::renderStylesheet`: Renders the map stylesheet.

**Don't forget to always render the Google API loading after rendering your map.**
8 changes: 0 additions & 8 deletions Resources/doc/static_map.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,3 @@ If you're using Twig, the most easy way to render a map is:
``` twig
<img src="{{ ivory_google_map_static(map) }}" />
```

### Php

If you're using the PHP templating engine, then, the most easy way to render a map is:

``` php
<img src="<?php echo $view['ivory_google_map_static']->render($map) ?>" />
```
4 changes: 0 additions & 4 deletions Resources/views/Form/place_autocomplete_widget.html.php

This file was deleted.

50 changes: 0 additions & 50 deletions Templating/ApiHelper.php

This file was deleted.

75 changes: 0 additions & 75 deletions Templating/MapHelper.php

This file was deleted.

65 changes: 0 additions & 65 deletions Templating/PlaceAutocompleteHelper.php

This file was deleted.

48 changes: 0 additions & 48 deletions Templating/StaticMapHelper.php

This file was deleted.

11 changes: 0 additions & 11 deletions Tests/DependencyInjection/AbstractIvoryGoogleMapExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,6 @@ public function testDefaultState(): void
$this->assertFalse($this->container->has('ivory.google_map.twig.extension.place_autocomplete'));
}

public function testTemplatingHelpers()
{
$this->container->setDefinition('templating.engine.php', new Definition(\stdClass::class));
$this->container->compile();

$this->assertTrue($this->container->has('ivory.google_map.templating.api'));
$this->assertTrue($this->container->has('ivory.google_map.templating.map'));
$this->assertTrue($this->container->has('ivory.google_map.templating.map.static'));
$this->assertTrue($this->container->has('ivory.google_map.templating.place_autocomplete'));
}

public function testTwigExtensions()
{
$this->container->setDefinition('twig', new Definition(\stdClass::class));
Expand Down
Loading

0 comments on commit af23b17

Please sign in to comment.