2017 © Pedro Peláez
 

silverstripe-module switchfield

A simple iOS switch alternative for the CheckboxField in SilverStripe

image

antons/switchfield

A simple iOS switch alternative for the CheckboxField in SilverStripe

  • Friday, March 25, 2016
  • by antons-
  • Repository
  • 1 Watchers
  • 2 Stars
  • 235 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 15 % Grown

The README.md

SilverStripe SwitchField

A simple iOS switch alternative for the CheckboxField in SilverStripe, (*1)

, (*2)

Usage

class MyDataObject extends DataObject {

    private static $db = array(
        'Switch' => 'Boolean'
    );

    public function getCMSFields() {
        $fields = parent::getCMSFields();

        // Create the SwitchField
        $switch = SwitchField::create('Switch', 'Switch', $this->Switch);

        $fields->addFieldToTab('Root.Main', $switch);

        return $fields;
    }

}

Attribution

This module is powered by the Switchery library built by Alexander Petkov https://github.com/abpetkov/switchery, (*3)

License

Copyright (c) 2016, Anton Smith, (*4)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*5)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*6)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*7)

The Versions

25/03 2016

dev-master

9999999-dev https://github.com/antons-/switchfield

A simple iOS switch alternative for the CheckboxField in SilverStripe

  Sources   Download

MIT

The Requires

 

switch silverstripe checkbox toggle togglefield checkboxfield

25/03 2016

0.2

0.2.0.0 https://github.com/antons-/switchfield

A simple iOS switch alternative for the CheckboxField in SilverStripe

  Sources   Download

MIT

The Requires

 

switch silverstripe checkbox toggle togglefield checkboxfield

18/02 2016

0.1

0.1.0.0 https://github.com/antons-/switchfield

A simple iOS switch alternative for the CheckboxField in SilverStripe

  Sources   Download

MIT

The Requires

 

switch silverstripe checkbox toggle togglefield checkboxfield