承接 cedriclombardot/propel-visibility-behavior 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

cedriclombardot/propel-visibility-behavior

Composer 安装命令:

composer require cedriclombardot/propel-visibility-behavior

包简介

Propel behavior that helps you to set a visibility per fields

README 文档

README

Build Status

The VisibilityBehavior behavior allows you to add visibility column per field and manage visible datas per user role.

Installation

Cherry-pick the VisibilityBehavior.php file is src/, put it somewhere, then add the following line to your propel.ini or build.properties configuration file:

propel.behavior.visibility.class = path.to.VisibilityBehavior

Usage

Just add the following XML tag in your schema.xml file:

<behavior name="visibility">
    <parameter name="visibilities" value="me, friends, all" />
    <parameter name="default_visibility" value="me" />
    <!-- Hiearchy of visibilities -->
    <parameter name="hierarchy" value="when it's visible for friends it's visible for me" />
    <parameter name="hierarchy" value="when it's visible for all it's visible for friends" />
    <parameter name="hierarchy" value="when it's visible for all it's visible for me" />
    <!-- Choose columns to apply -->
    <parameter name="apply_to" value="my_field, my_other_field" />

    <!-- Optional parameters -->
    <parameter name="with_description" value="true" />
</behavior>

The visibility behavior requires four parameters to work:

  • visibilities: a finite set of visibilities as comma separated values;
  • default_visibility: the initial state, part of set of visibilities;
  • hierarchy: a set of hierarchies. As you can see, you can add as many hierarchy parameters as you want.
  • apply_to: the list of column to apply the visibility behavior

Each hierarchy has to follow this pattern:

when it's visible for VISIBILITY_1 it's visible for VISIBILITY_2

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-07-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固