From 83ebe81632a61964a58311770f35b4909f7de21c Mon Sep 17 00:00:00 2001 From: Igor Nikolaev Date: Wed, 10 Jul 2019 15:25:31 +0300 Subject: [PATCH] Remove redundant new object Twig extension. --- Resources/config/new_object.yaml | 10 ---------- Resources/doc/new_entity_counter.md | 2 -- 2 files changed, 12 deletions(-) diff --git a/Resources/config/new_object.yaml b/Resources/config/new_object.yaml index 10b8dc6..b4d9aaa 100644 --- a/Resources/config/new_object.yaml +++ b/Resources/config/new_object.yaml @@ -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 @@ -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 } diff --git a/Resources/doc/new_entity_counter.md b/Resources/doc/new_entity_counter.md index 5939162..8ca0a98 100644 --- a/Resources/doc/new_entity_counter.md +++ b/Resources/doc/new_entity_counter.md @@ -37,5 +37,3 @@ $newPagesCount = $this->getContainer()->get('darvin_utils.new_object.counter')-> ``` Для проверки возможности подсчета новых сущностей того или иного класса сервис содержит метод "isCountable()". - -Методы сервиса доступны в Twig - это функции "utils_count_new_objects()" и "utils_new_objects_countable()" соответственно.