2017 © Pedro Peláez
 

silverstripe-module ss-behaviours

Add a hash or slug to any DataObject in Silverstripe

image

milkyway-multimedia/ss-behaviours

Add a hash or slug to any DataObject in Silverstripe

  • Wednesday, January 20, 2016
  • by mi3ll
  • Repository
  • 2 Watchers
  • 4 Stars
  • 60 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Behaviours

Build Status, (*1)

Behaviours is a set of common DataExtensions and Traits to use with Silverstripe, (*2)

  • Hashable: This creates a unique hash for your DataObject. This cannot be decoded, but does not rely on any field on the original DataObject. This is used mainly as a replacement for ID if you want to hide the ID from the front-end, or in the case of not needing a unique value it can be a reference to differentiate records by certain attributes (such as product options - same size, colour, etc)
  • Sluggable: This creates a slug for the DataObject. This can be decoded back to its original state. Usually used as a replacement for ID with URLs.

Install

Add the following to your composer.json file, (*3)


"require" : { "milkyway-multimedia/ss-behaviors": "dev-master" },

Add the following in your YAML config for objects you would like to hash/slug, (*4)


YourDataObject: extensions: - Milkyway\SS\Behaviours\Extensions\Hashable

License

  • MIT

Version

  • 0.2 (Alpha)

Contact

Milkyway Multimedia

  • Homepage: http://milkywaymultimedia.com.au
  • E-mail: mell@milkywaymultimedia.com.au
  • Twitter: @mwmdesign

The Versions

20/01 2016

dev-master

9999999-dev

Add a hash or slug to any DataObject in Silverstripe

  Sources   Download

The Requires

 

The Development Requires

12/09 2014

0.1.0

0.1.0.0

Add a hash to any DataObject in Silverstripe

  Sources   Download

The Requires