1. Go to this page and download the library: Download tourze/tag-manage-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
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);
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']);