PHPackages                             tourze/tag-manage-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tourze/tag-manage-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

tourze/tag-manage-bundle
========================

通用标签管理

1.0.2(5mo ago)06365MITPHPCI passing

Since Nov 1Pushed 4mo agoCompare

[ Source](https://github.com/tourze/tag-manage-bundle)[ Packagist](https://packagist.org/packages/tourze/tag-manage-bundle)[ RSS](/packages/tourze-tag-manage-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (42)Versions (4)Used By (5)

TagManageBundle
===============

[](#tagmanagebundle)

[English](README.md) | [中文](README.zh-CN.md)

A comprehensive tag management system for Symfony, providing complete tag and tag group management features with EasyAdmin backend integration and JsonRPC API support.

Features
--------

[](#features)

- � **Tag Management**: Create, edit, delete tags with unique name validation
- � **Tag Groups**: Organize tags into groups for better management
- � **EasyAdmin Integration**: Complete backend management interface
- � **JsonRPC API**: Rich API interface support
- � **Cache Support**: Automatic API result caching for performance
- � **Pagination**: Tag list pagination and filtering
- � **Audit Fields**: Automatic tracking of creation/update time and users
- � **Soft Delete**: Tag validity status management
- � **Search**: Keyword-based tag search functionality

Requirements
------------

[](#requirements)

- PHP 8.1+
- Symfony 7.3+
- Doctrine ORM 3.0+

Installation
------------

[](#installation)

Install using Composer:

```
composer require tourze/tag-manage-bundle
```

Configuration
-------------

[](#configuration)

### 1. Register Bundle

[](#1-register-bundle)

Register in `config/bundles.php`:

```
return [
    // ...
    Tourze\TagManageBundle\TagManageBundle::class => ['all' => true],
];
```

### 2. Database Migration

[](#2-database-migration)

Bundle automatically creates the following database tables:

- `cms_tag`: Tags table
- `cms_tag_group`: Tag groups table

Run database migration:

```
php bin/console doctrine:migrations:migrate
```

### 3. Load Fixtures (Optional)

[](#3-load-fixtures-optional)

To load test data:

```
php bin/console doctrine:fixtures:load --group=tag
```

Usage
-----

[](#usage)

### 1. Entity Usage

[](#1-entity-usage)

```
use Tourze\TagManageBundle\Entity\Tag;
use Tourze\TagManageBundle\Entity\TagGroup;

// Create tag group
$group = new TagGroup();
$group->setName('Technology');

// Create tag
$tag = new Tag();
$tag->setName('PHP');
$tag->setGroups($group);
$tag->setValid(true);
```

### 2. EasyAdmin Backend Management

[](#2-easyadmin-backend-management)

Bundle automatically registers backend management routes:

- Tag Management: `/admin/cms/tag`
- Tag Group Management: `/admin/cms/tag-group`

### 3. JsonRPC API Usage

[](#3-jsonrpc-api-usage)

#### Get Tag List

[](#get-tag-list)

```
{
  "jsonrpc": "2.0",
  "method": "GetTagList",
  "params": {
    "groupId": "group_id",
    "keyword": "search keyword",
    "validOnly": true,
    "orderBy": "createTime",
    "orderDir": "DESC",
    "includeUsageStats": true
  },
  "id": 1
}
```

#### Get Tag Group List

[](#get-tag-group-list)

```
{
  "jsonrpc": "2.0",
  "method": "GetTagGroupList",
  "params": {
    "orderBy": "name",
    "orderDir": "ASC"
  },
  "id": 2
}
```

#### Get Tag Group Detail

[](#get-tag-group-detail)

```
{
  "jsonrpc": "2.0",
  "method": "GetTagGroupDetail",
  "params": {
    "id": "group_id",
    "includeTags": true
  },
  "id": 3
}
```

#### Search Tags

[](#search-tags)

```
{
  "jsonrpc": "2.0",
  "method": "SearchTags",
  "params": {
    "keyword": "PHP",
    "groupId": "group_id",
    "validOnly": true
  },
  "id": 4
}
```

### 4. Repository Queries

[](#4-repository-queries)

```
use Tourze\TagManageBundle\Repository\TagRepository;
use Tourze\TagManageBundle\Repository\TagGroupRepository;

// Tag queries
$tags = $tagRepository->findBy(['valid' => true], ['name' => 'ASC']);
$tag = $tagRepository->findOneBy(['name' => 'PHP']);

// Tag group queries
$groups = $tagGroupRepository->findAll();
$group = $tagGroupRepository->findOneBy(['name' => 'Technology']);
```

Configuration Options
---------------------

[](#configuration-options)

Configure in `config/packages/tag_manage.yaml`:

```
tag_manage:
    # Cache duration in seconds, default 600
    cache_duration: 600

    # Default page size, default 20
    default_page_size: 20

    # Enable usage statistics, default false
    enable_usage_stats: false
```

Entity Fields
-------------

[](#entity-fields)

### Tag

[](#tag)

FieldTypeDescriptionidintegerPrimary key IDnamestring(60)Tag name (unique)groupsTagGroupBelonging tag groupvalidbooleanValid statuscreateTimedatetimeCreation timeupdateTimedatetimeUpdate timecreateUserstringCreation userupdateUserstringUpdate user### TagGroup

[](#taggroup)

FieldTypeDescriptionidstringSnowflake ID primary keynamestring(60)Group namecreateTimedatetimeCreation timeupdateTimedatetimeUpdate timecreateUserstringCreation userupdateUserstringUpdate userAPI Response Format
-------------------

[](#api-response-format)

### List Interface Response

[](#list-interface-response)

```
{
  "jsonrpc": "2.0",
  "result": {
    "list": [
      {
        "id": 1,
        "name": "PHP",
        "valid": true,
        "group": {
          "id": "1234567890123456789",
          "name": "Technology"
        },
        "createTime": "2024-01-01 12:00:00",
        "updateTime": "2024-01-01 12:00:00",
        "usageCount": 156,
        "lastUsedTime": "2024-01-15 10:30:00"
      }
    ],
    "pagination": {
      "current": 1,
      "pageSize": 20,
      "total": 100,
      "hasMore": true
    }
  },
  "id": 1
}
```

Testing
-------

[](#testing)

Run the test suite:

```
# Run all tests
php bin/console phpunit tests/TagManageBundle/

# Run specific tests
php bin/console phpunit tests/TagManageBundle/Entity/TagTest.php

# Run coverage test
php bin/console phpunit --coverage-html coverage tests/TagManageBundle/
```

Dependencies
------------

[](#dependencies)

Bundle depends on the following key packages:

- **EasyAdminBundle**: Backend management interface
- **Doctrine ORM**: Data persistence
- **JsonRPC Core**: API interface support
- **JsonRPC Cache**: API caching functionality
- **JsonRPC Paginator**: Pagination functionality
- **Doctrine Timestamp Bundle**: Timestamp fields
- **Doctrine User Bundle**: User audit fields
- **Doctrine IP Bundle**: IP audit fields

Changelog
---------

[](#changelog)

### 1.0.0

[](#100)

- Initial release
- Tag and tag group management support
- EasyAdmin backend integration
- JsonRPC API interface
- Cache and pagination support

Contributing
------------

[](#contributing)

Issues and Pull Requests are welcome!

License
-------

[](#license)

MIT License

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance72

Regular maintenance activity

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

3

Last Release

178d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e354fdb316da535dfa8ba2e9193a473c403b6bc6fb9170778d1dc50e304c6e9d?d=identicon)[tourze](/maintainers/tourze)

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-tag-manage-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-tag-manage-bundle/health.svg)](https://phpackages.com/packages/tourze-tag-manage-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
