kaystrobach / tags

在此处添加描述

安装数量: 2,952

依赖项: 0

建议: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:neos-package

2.1.0 2024-08-25 11:52 UTC

This package is auto-updated.

Last update: 2024-09-25 12:00:36 UTC


README

{namespace ks=KayStrobach/Tags/ViewHelpers}

<ks:ifHasTag object="{object}" tag="{tag}">
    <f:then>
        ...
    </f:then>
    <f:else>
        ...
    </f:else>
</ks:ifHasTag>

标签功能通过

  • 标签模型
  • 可标记接口
  • 可标记特质

通过这些辅助工具,您可以在几分钟内添加标签

目前还没有添加标签的接口。请使用数据库。

如何使您的实体可标记


use KayStrobach\Tags\Domain\Model\TagableTrait;

/**
 * @Flow\Entity
 */
class Entity implements TagableInterface
{

    use TagableTrait;
    
    public function __construct()
    {
        $this->initTags();
    }
}