From b02b81214c6ae3e652d44bf30423ad6e846562c6 Mon Sep 17 00:00:00 2001 From: teebbstudios Date: Fri, 6 Nov 2020 17:57:43 +0800 Subject: [PATCH] sonata block bundle and dashboard blocks --- composer.json | 1 + composer.lock | 608 ++++++++++++++++++++++++++++++- config/bundles.php | 4 + config/packages/sonata_form.yaml | 2 + config/packages/teebb_core.yaml | 60 +++ symfony.lock | 30 ++ 6 files changed, 704 insertions(+), 1 deletion(-) create mode 100644 config/packages/sonata_form.yaml diff --git a/composer.json b/composer.json index 0596f08..91413c1 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "oneup/flysystem-bundle": "^3.5", "pagerfanta/pagerfanta": "^2.3", "sensio/framework-extra-bundle": "^5.1", + "sonata-project/block-bundle": "^4.4", "stof/doctrine-extensions-bundle": "^1.4", "symfony/asset": "^5.0", "symfony/console": "^5.0", diff --git a/composer.lock b/composer.lock index 1f4e37a..9aa1d83 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "227f866a0b168a4a802134edfc5d1987", + "content-hash": "46f5f14feffa678af7a37df10a1bec78", "packages": [ { "name": "api-platform/api-pack", @@ -1807,6 +1807,7 @@ "reflection", "static" ], + "abandoned": "roave/better-reflection", "time": "2020-03-27T11:06:43+00:00" }, { @@ -2299,6 +2300,163 @@ ], "time": "2019-12-04T09:55:33+00:00" }, + { + "name": "jms/metadata", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/metadata.git", + "reference": "6eb35fce7142234946d58d13e1aa829e9b78b095" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6eb35fce7142234946d58d13e1aa829e9b78b095", + "reference": "6eb35fce7142234946d58d13e1aa829e9b78b095", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "doctrine/cache": "^1.0", + "doctrine/coding-standard": "^4.0", + "phpunit/phpunit": "^7.0", + "symfony/cache": "^3.1|^4.0|^5.0", + "symfony/dependency-injection": "^3.1|^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Metadata\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "Class/method/property metadata management in PHP", + "keywords": [ + "annotations", + "metadata", + "xml", + "yaml" + ], + "time": "2020-06-06T16:52:59+00:00" + }, + { + "name": "jms/serializer", + "version": "3.10.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/serializer.git", + "reference": "0ed0b6aa79cc029772286f2dc262f6933674b0ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/0ed0b6aa79cc029772286f2dc262f6933674b0ec", + "reference": "0ed0b6aa79cc029772286f2dc262f6933674b0ec", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/instantiator": "^1.0.3", + "doctrine/lexer": "^1.1", + "jms/metadata": "^2.0", + "php": "^7.2" + }, + "require-dev": { + "doctrine/coding-standard": "^8.1", + "doctrine/orm": "~2.1", + "doctrine/persistence": "^1.3.3|^2.0|^3.0", + "doctrine/phpcr-odm": "^1.3|^2.0", + "ext-pdo_sqlite": "*", + "jackalope/jackalope-doctrine-dbal": "^1.1.5", + "ocramius/proxy-manager": "^1.0|^2.0", + "phpunit/phpunit": "^8.0||^9.0", + "psr/container": "^1.0", + "symfony/dependency-injection": "^3.0|^4.0|^5.0", + "symfony/expression-language": "^3.0|^4.0|^5.0", + "symfony/filesystem": "^3.0|^4.0|^5.0", + "symfony/form": "^3.0|^4.0|^5.0", + "symfony/translation": "^3.0|^4.0|^5.0", + "symfony/validator": "^3.1.9|^4.0|^5.0", + "symfony/yaml": "^3.3|^4.0|^5.0", + "twig/twig": "~1.34|~2.4|^3.0" + }, + "suggest": { + "doctrine/cache": "Required if you like to use cache functionality.", + "doctrine/collections": "Required if you like to use doctrine collection types as ArrayCollection.", + "symfony/yaml": "Required if you'd like to use the YAML metadata format." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.10-dev" + } + }, + "autoload": { + "psr-4": { + "JMS\\Serializer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", + "homepage": "http://jmsyst.com/libs/serializer", + "keywords": [ + "deserialization", + "jaxb", + "json", + "serialization", + "xml" + ], + "funding": [ + { + "url": "https://github.com/goetas", + "type": "github" + } + ], + "time": "2020-10-29T20:24:00+00:00" + }, { "name": "knplabs/knp-menu", "version": "v3.1.2", @@ -3722,6 +3880,454 @@ ], "time": "2020-08-25T19:10:18+00:00" }, + { + "name": "sonata-project/block-bundle", + "version": "4.4.0", + "source": { + "type": "git", + "url": "https://github.com/sonata-project/SonataBlockBundle.git", + "reference": "2a9324daa694650f320aceed6b590cc7d2e20f42" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sonata-project/SonataBlockBundle/zipball/2a9324daa694650f320aceed6b590cc7d2e20f42", + "reference": "2a9324daa694650f320aceed6b590cc7d2e20f42", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/collections": "^1.6", + "doctrine/common": "^2.7.1 || ^3.0", + "php": "^7.3", + "psr/cache": "^1.0", + "sonata-project/cache": "^2.0", + "sonata-project/doctrine-extensions": "^1.1", + "sonata-project/form-extensions": "^1.4", + "sonata-project/twig-extensions": "^1.0", + "symfony/asset": "^4.4 || ^5.0", + "symfony/config": "^4.4 || ^5.0", + "symfony/console": "^4.4 || ^5.0", + "symfony/dependency-injection": "^4.4 || ^5.0", + "symfony/event-dispatcher": "^4.4 || ^5.0", + "symfony/event-dispatcher-contracts": "^1.1 || ^2.0", + "symfony/form": "^4.4 || ^5.0", + "symfony/framework-bundle": "^4.4 || ^5.0", + "symfony/http-foundation": "^4.4 || ^5.0", + "symfony/http-kernel": "^4.4 || ^5.0", + "symfony/options-resolver": "^4.4 || ^5.1", + "symfony/twig-bundle": "^4.4 || ^5.0", + "twig/twig": "^2.12.1 || ^3.0" + }, + "conflict": { + "knplabs/knp-menu-bundle": "<3.0" + }, + "require-dev": { + "knplabs/knp-menu": "^3.1", + "knplabs/knp-menu-bundle": "^3.0", + "matthiasnoback/symfony-dependency-injection-test": "^4.1", + "phpspec/prophecy": "^1.10", + "psalm/plugin-symfony": "^1.4", + "symfony/browser-kit": "^4.4 || ^5.0", + "symfony/debug": "^4.4 || ^5.0", + "symfony/phpunit-bridge": "^5.1.1", + "symfony/stopwatch": "^4.4 || ^5.1", + "vimeo/psalm": "^3.13.1" + }, + "suggest": { + "knplabs/knp-menu-bundle": "Required to use the menu block" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sonata\\BlockBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Thomas Rabaix", + "email": "thomas.rabaix@sonata-project.org", + "homepage": "https://sonata-project.org" + }, + { + "name": "Sonata Community", + "homepage": "https://github.com/sonata-project/SonataBlockBundle/contributors" + } + ], + "description": "Symfony SonataBlockBundle", + "homepage": "https://sonata-project.org/bundles/block", + "keywords": [ + "block", + "sonata" + ], + "funding": [ + { + "url": "https://github.com/OskarStark", + "type": "github" + }, + { + "url": "https://github.com/VincentLanglet", + "type": "github" + }, + { + "url": "https://github.com/core23", + "type": "github" + } + ], + "time": "2020-10-11T17:37:55+00:00" + }, + { + "name": "sonata-project/cache", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sonata-project/cache.git", + "reference": "2e2fdabf40bfe566c68406aae238a721cddabf74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sonata-project/cache/zipball/2e2fdabf40bfe566c68406aae238a721cddabf74", + "reference": "2e2fdabf40bfe566c68406aae238a721cddabf74", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1", + "psr/log": "^1.0" + }, + "require-dev": { + "doctrine/orm": "^2.5", + "doctrine/phpcr-odm": "^1.4", + "jackalope/jackalope-doctrine-dbal": "^1.2", + "predis/predis": "^1.1", + "sllh/php-cs-fixer-styleci-bridge": "^2.1", + "symfony/phpunit-bridge": "^3.3" + }, + "suggest": { + "doctrine/orm": "ORM support", + "doctrine/phpcr-odm": "PHPCR ODM support", + "ext-apc": "Caching with ext/apc", + "ext-memcached": "Caching with ext/memcached", + "predis/predis": "Install redis php" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sonata\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Thomas Rabaix", + "email": "thomas.rabaix@gmail.com", + "homepage": "https://sonata-project.org/" + }, + { + "name": "Sonata Community", + "homepage": "https://github.com/sonata-project/cache/contributors" + } + ], + "description": "Cache library", + "homepage": "https://github.com/sonata-project/cache", + "keywords": [ + "cache", + "memcached", + "mongodb", + "redis" + ], + "time": "2017-12-08T09:22:44+00:00" + }, + { + "name": "sonata-project/doctrine-extensions", + "version": "1.10.1", + "source": { + "type": "git", + "url": "https://github.com/sonata-project/sonata-doctrine-extensions.git", + "reference": "38ca6a7038b5e6feb220198bebfb244f675f41e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sonata-project/sonata-doctrine-extensions/zipball/38ca6a7038b5e6feb220198bebfb244f675f41e1", + "reference": "38ca6a7038b5e6feb220198bebfb244f675f41e1", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/dbal": "^2.6", + "doctrine/persistence": "^1.3.6 || ^2.0", + "php": "^7.2" + }, + "conflict": { + "doctrine/doctrine-bundle": "<2.0", + "doctrine/mongodb-odm": "<2.0", + "doctrine/orm": "<2.5", + "doctrine/phpcr-odm": "<1.5.2" + }, + "require-dev": { + "doctrine/common": "^2.7 || ^3.0", + "doctrine/doctrine-bundle": "^2.0", + "doctrine/mongodb-odm": "^2.0", + "doctrine/orm": "^2.5", + "doctrine/phpcr-odm": "^1.5.2", + "jackalope/jackalope-doctrine-dbal": "^1.0", + "matthiasnoback/symfony-dependency-injection-test": "^4.0", + "symfony/dependency-injection": "^4.4 || ^5.1", + "symfony/expression-language": "^4.4 || ^5.1", + "symfony/framework-bundle": "^4.4 || ^5.1", + "symfony/phpunit-bridge": "^5.1.1" + }, + "suggest": { + "doctrine/orm": "If you use doctrine orm", + "doctrine/phpcr-odm": "If you use doctrine phpcr", + "symfony/framework-bundle": "If you want to use symfony" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sonata\\Doctrine\\": "src/", + "Sonata\\Doctrine\\Bridge\\Symfony\\": "src/Bridge/Symfony/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Thomas Rabaix", + "email": "thomas.rabaix@sonata-project.org", + "homepage": "http://sonata-project.org" + }, + { + "name": "Sonata Community", + "homepage": "https://github.com/sonata-project/sonata-doctrine-extensions/contributors" + } + ], + "description": "Doctrine2 behavioral extensions", + "homepage": "https://github.com/sonata-project/sonata-doctrine-extensions", + "keywords": [ + "doctrine", + "doctrine2", + "json" + ], + "funding": [ + { + "url": "https://github.com/OskarStark", + "type": "github" + }, + { + "url": "https://github.com/VincentLanglet", + "type": "github" + }, + { + "url": "https://github.com/core23", + "type": "github" + } + ], + "time": "2020-10-21T14:14:29+00:00" + }, + { + "name": "sonata-project/form-extensions", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/sonata-project/form-extensions.git", + "reference": "0feec89e2770fb5ddd84eae14bfe45cf5437e1c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sonata-project/form-extensions/zipball/0feec89e2770fb5ddd84eae14bfe45cf5437e1c8", + "reference": "0feec89e2770fb5ddd84eae14bfe45cf5437e1c8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "jms/metadata": "^2.1", + "jms/serializer": "^2.0 || ^3.0", + "php": "^7.2", + "sonata-project/doctrine-extensions": "^1.1", + "symfony/event-dispatcher": "^4.4 || ^5.0", + "symfony/form": "^4.4 || ^5.0", + "symfony/options-resolver": "^4.4 || ^5.0", + "symfony/property-access": "^4.4 || ^5.0", + "symfony/security-csrf": "^4.4 || ^5.0", + "symfony/translation": "^4.4 || ^5.0", + "symfony/validator": "^4.4 || ^5.0", + "twig/twig": "^2.12 || ^3.0" + }, + "conflict": { + "sonata-project/core-bundle": ">=3.13" + }, + "require-dev": { + "doctrine/persistence": "^1.1", + "matthiasnoback/symfony-config-test": "^4.0", + "matthiasnoback/symfony-dependency-injection-test": "^4.0", + "symfony/config": "^4.4 || ^5.0", + "symfony/dependency-injection": "^4.4 || ^5.0", + "symfony/framework-bundle": "^4.4 || ^5.0", + "symfony/http-foundation": "^4.4 || ^5.0", + "symfony/http-kernel": "^4.4 || ^5.0", + "symfony/phpunit-bridge": "^5.1", + "symfony/twig-bridge": "^4.4 || ^5.0" + }, + "suggest": { + "doctrine/persistence": "If you want to use BaseDoctrineORMSerializationType" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sonata\\Form\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Thomas Rabaix", + "email": "thomas.rabaix@sonata-project.org", + "homepage": "https://sonata-project.org" + }, + { + "name": "Sonata Community", + "homepage": "https://github.com/sonata-project/form-extensions/contributors" + } + ], + "description": "Symfony form extensions", + "homepage": "https://sonata-project.org/bundles/form-extensions", + "keywords": [ + "form", + "symfony" + ], + "time": "2020-08-05T19:56:22+00:00" + }, + { + "name": "sonata-project/twig-extensions", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sonata-project/twig-extensions.git", + "reference": "8da644925839610128c74ce9c8f5c23b7c4b5efd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sonata-project/twig-extensions/zipball/8da644925839610128c74ce9c8f5c23b7c4b5efd", + "reference": "8da644925839610128c74ce9c8f5c23b7c4b5efd", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.2", + "sonata-project/doctrine-extensions": "^1.9", + "symfony/config": "^4.4 || ^5.1", + "symfony/translation": "^4.4 || ^5.1", + "symfony/twig-bridge": "^4.4 || ^5.1", + "twig/twig": "^2.6 || ^3.0" + }, + "conflict": { + "sonata-project/core-bundle": ">=3.13" + }, + "require-dev": { + "jms/serializer-bundle": "^3.3", + "matthiasnoback/symfony-config-test": "^4.0", + "matthiasnoback/symfony-dependency-injection-test": "^4.0", + "symfony/browser-kit": "^4.4 || ^5.1", + "symfony/dependency-injection": "^4.4 || ^5.1", + "symfony/framework-bundle": "^4.4 || ^5.0", + "symfony/http-foundation": "^4.4 || ^5.1", + "symfony/http-kernel": "^4.4 || ^5.1", + "symfony/phpunit-bridge": "^5.1", + "symfony/twig-bundle": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sonata\\Twig\\": "src/", + "Sonata\\Twig\\Bridge\\Symfony\\": "src/Bridge/Symfony/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Thomas Rabaix", + "email": "thomas.rabaix@sonata-project.org", + "homepage": "https://sonata-project.org" + }, + { + "name": "Sonata Community", + "homepage": "https://github.com/sonata-project/twig-extensions/contributors" + } + ], + "description": "Sonata twig extensions", + "homepage": "https://sonata-project.org/bundles/twig-extensions", + "keywords": [ + "sonata", + "twig", + "twig-extensions" + ], + "time": "2020-08-09T21:35:09+00:00" + }, { "name": "stof/doctrine-extensions-bundle", "version": "v1.4.0", diff --git a/config/bundles.php b/config/bundles.php index ba0bdb1..b256bbf 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -23,4 +23,8 @@ return [ BabDev\PagerfantaBundle\BabDevPagerfantaBundle::class => ['all' => true], Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true], Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true], + Sonata\Doctrine\Bridge\Symfony\SonataDoctrineSymfonyBundle::class => ['all' => true], + Sonata\Twig\Bridge\Symfony\SonataTwigSymfonyBundle::class => ['all' => true], + Sonata\Form\Bridge\Symfony\SonataFormBundle::class => ['all' => true], + Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true], ]; diff --git a/config/packages/sonata_form.yaml b/config/packages/sonata_form.yaml new file mode 100644 index 0000000..d540e7f --- /dev/null +++ b/config/packages/sonata_form.yaml @@ -0,0 +1,2 @@ +sonata_form: + form_type: standard diff --git a/config/packages/teebb_core.yaml b/config/packages/teebb_core.yaml index aa9e275..d58925f 100644 --- a/config/packages/teebb_core.yaml +++ b/config/packages/teebb_core.yaml @@ -79,6 +79,66 @@ teebb_core: groups: [] groups: [] + #dashboard index blocks + blocks: + - position: top + type: teebb.core.block.count #block service type + class: col-xl-3 col-md-6 mb-4 #block class + groups: [] #block show user groups + settings: + entity_class: Teebb\CoreBundle\Entity\Content #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 + label: contents(last month) #block label + #translation_domain: #default: messages + icon: fas fa-file-alt #block icon + border: border-left-primary #block border + #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 + duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month + #template: #default template @TeebbCore/Block/count_block.html.twig + + - position: top + type: teebb.core.block.count #block service type + class: col-xl-3 col-md-6 mb-4 #block class + groups: [] #block show user groups + settings: + entity_class: Teebb\CoreBundle\Entity\Types\Types #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 + bundle: content + label: content_types #block label + #translation_domain: #default: messages + icon: fas fa-boxes #block icon + border: border-left-success #block border + #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 + duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month + #template: #default template @TeebbCore/Block/count_block.html.twig + + - position: top + type: teebb.core.block.count #block service type + class: col-xl-3 col-md-6 mb-4 #block class + groups: [] #block show user groups + settings: + entity_class: Teebb\CoreBundle\Entity\User #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 + label: users(last month) #block label + #translation_domain: #default: messages + icon: fas fa-user #block icon + border: border-left-info #block border + #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 + duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month + #template: #default template @TeebbCore/Block/count_block.html.twig + + - position: top + type: teebb.core.block.count #block service type + class: col-xl-3 col-md-6 mb-4 #block class + groups: [] #block show user groups + settings: + entity_class: Teebb\CoreBundle\Entity\Comment #block admin. admin 对应的entity 应含有 createAt 和 updateAt 两个时间属性。 + label: comments(last month) #block label + #translation_domain: #default: messages + icon: fas fa-comments #block icon + border: border-left-warning #block border + #property: createdAt #query object property. 要查询的Entity的属性以此属性统计数量 + duration: -1 month #The count of content in a duration, must earlier than now. see php strtotime. default: -1 month + #template: #default template @TeebbCore/Block/count_block.html.twig + + mapping: directories: ['%kernel.project_dir%/src'] diff --git a/symfony.lock b/symfony.lock index 831e03b..a76a894 100644 --- a/symfony.lock +++ b/symfony.lock @@ -137,6 +137,12 @@ "imagine/imagine": { "version": "1.2.3" }, + "jms/metadata": { + "version": "2.3.0" + }, + "jms/serializer": { + "version": "3.10.0" + }, "knplabs/knp-menu": { "version": "v3.1.2" }, @@ -243,6 +249,30 @@ "config/packages/sensio_framework_extra.yaml" ] }, + "sonata-project/block-bundle": { + "version": "4.4.0" + }, + "sonata-project/cache": { + "version": "2.0.1" + }, + "sonata-project/doctrine-extensions": { + "version": "1.10.1" + }, + "sonata-project/form-extensions": { + "version": "1.4", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "master", + "version": "1.4", + "ref": "bfc222606aea5418345af70104d974a25dc7c441" + }, + "files": [ + "config/packages/sonata_form.yaml" + ] + }, + "sonata-project/twig-extensions": { + "version": "1.4.1" + }, "stof/doctrine-extensions-bundle": { "version": "1.2", "recipe": { -- GitLab