Skip to content

Commit

Permalink
Remove redundant new object Twig extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Nikolaev committed Jul 10, 2019
1 parent 8454f5f commit 83ebe81
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions Resources/config/new_object.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
parameters:
darvin_utils.new_object.counter.entity.class: Darvin\Utils\NewObject\NewEntityCounter

darvin_utils.new_object.twig_extension.class: Darvin\Utils\Twig\Extension\NewObjectExtension

services:
_defaults:
public: true
Expand All @@ -16,11 +14,3 @@ services:
- "@doctrine.orm.entity_manager"
- "@darvin_utils.mapping.metadata_factory"
- "@darvin_utils.user.query_builder_filterer"

darvin_utils.new_object.twig_extension:
class: "%darvin_utils.new_object.twig_extension.class%"
public: false
arguments:
- "@darvin_utils.new_object.counter"
tags:
- { name: twig.extension }
2 changes: 0 additions & 2 deletions Resources/doc/new_entity_counter.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ $newPagesCount = $this->getContainer()->get('darvin_utils.new_object.counter')->
```

Для проверки возможности подсчета новых сущностей того или иного класса сервис содержит метод "isCountable()".

Методы сервиса доступны в Twig - это функции "utils_count_new_objects()" и "utils_new_objects_countable()" соответственно.

0 comments on commit 83ebe81

Please sign in to comment.