2017 © Pedro Peláez
 

silverstripe-module silverstripe-script-genie

A SilverStripe module which produces static JSON data files from specific models on-demand or onAfter{Write,Publish}

image

marketo/silverstripe-script-genie

A SilverStripe module which produces static JSON data files from specific models on-demand or onAfter{Write,Publish}

  • Thursday, April 6, 2017
  • by nyeholt
  • Repository
  • 14 Watchers
  • 3 Stars
  • 84 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

SilverStripe-Script-Genie

Configuration

ObjectType:
  regenerate_scripts: true:
  extensions:
    - GenieExtension

Injector:
  GenieScriptService:
    properties:
      typeConfiguration:
        MyClass:
          target_filename: # just use 'default' if no other needed
            generator: AClassName # Implementing getList
            filter: 
              "arrayKey:GreaterThan": "filter value"
              "CalculatedField": %strtotime|-2 weeks|Y-m-d H:i:s% 
              "OtherProp": "with things"
            order: FieldName DESC, Other ASC
            limit: 10
            template: TemplateName
            fields: ID,LastEdited,Title [optional, otherwise all fields returned]
            rootObject: TopLevelJsObjectName [optional, defaults to Window]

For CalculatedField above, the system will calculate an appropriate value based on the provided arguments, in this case it will perform a strototime on '-2 weeks', followed by converting it to a date in the provided format., (*1)

If you're wanting to generate the list completely by hand, create a class that implements the getList method that returns an SS_List (ie DataList or ArrayList) ., (*2)

The Versions

06/04 2017

dev-master

9999999-dev

A SilverStripe module which produces static JSON data files from specific models on-demand or onAfter{Write,Publish}

  Sources   Download

BSD-3-Clause

The Requires

 

06/04 2017

1.2.0

1.2.0.0

A SilverStripe module which produces static JSON data files from specific models on-demand or onAfter{Write,Publish}

  Sources   Download

BSD-3-Clause

The Requires

 

18/12 2015

1.1.0

1.1.0.0

A SilverStripe module which produces static JSON data files from specific models on-demand or onAfter{Write,Publish}

  Sources   Download

BSD-3-Clause

The Requires

 

11/12 2015

1.0.0

1.0.0.0

A SilverStripe module which produces static JSON data files from specific models on-demand or onAfter{Write,Publish}

  Sources   Download

BSD-3-Clause

The Requires