2017 © Pedro Peláez
 

library propel-visibility-behavior

Propel behavior that helps you to set a visibility per fields

image

cedriclombardot/propel-visibility-behavior

Propel behavior that helps you to set a visibility per fields

  • Tuesday, July 30, 2013
  • by cedriclombardot
  • Repository
  • 1 Watchers
  • 3 Stars
  • 1,004 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

VisibilityBehavior

Build Status, (*1)

The VisibilityBehavior behavior allows you to add visibility column per field and manage visible datas per user role., (*2)

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:, (*3)

``` ini propel.behavior.visibility.class = path.to.VisibilityBehavior, (*4)



Usage ----- Just add the following XML tag in your `schema.xml` file: ``` xml <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:, (*5)

  • 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:, (*6)

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

The Versions

30/07 2013

dev-master

9999999-dev

Propel behavior that helps you to set a visibility per fields

  Sources   Download

MIT

The Requires

 

by Cedric LOMBARDOT

behavior propel visibility privacy

30/07 2013

0.0.2

0.0.2.0

Propel behavior that helps you to set a visibility per fields

  Sources   Download

MIT

The Requires

 

by Cedric LOMBARDOT

behavior propel visibility privacy

28/07 2013

0.0.1

0.0.1.0

Propel behavior that helps you to set a visibility per fields

  Sources   Download

MIT

The Requires

 

by Cedric LOMBARDOT

behavior propel visibility privacy