dnadesign/silverstripe-tagurit 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dnadesign/silverstripe-tagurit

最新稳定版本:2.0.1

Composer 安装命令:

composer require dnadesign/silverstripe-tagurit

包简介

An alternative taxonomy module, providing protected types, and inverting the Tag/Type relationship to Type/Tag

README 文档

README

An alternative taxonomy module for SilverStripe

Introduction

This module inverts the term/type relationship to type/term and allows setting default/protected types/terms

Requirements

  • SilverStripe 4.4
  • GridFieldExtensions 3.2

Installation

Include the following in your composer.json and run composer update:

"require": {
    dnadesign/silverstripe-tagurit
}
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/dnadesign/silverstripe-tagurit.git"
        }
    ],

Configure the yml:

tagurit_protected_taxonomy:
  Type one:
    - Term
    - Second Term
  Second type:
    - Another Term

On your page, use the trait

    use TaxonomyTrait;

     private static $many_many = [
        'CustomTerms' => TaxonomyTerm::class
    ];
    
    public function getCMSFields()
    {
        $fields = parent::getCMSFields();

        $fields->addFieldsToTab(
            'Root.Terms',
            [
                ListboxField::create(
                    'CustomTerms',
                    'Custom Terms',
                    $this->getTermsForType('Second type')
                ),
            ]
        );

        return $fields;
    }

Run the build task:

vendor/silverstripe/framework/sake dev/build flush=1

统计信息

  • 总下载量: 431
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 6
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固