2017 © Pedro Peláez
 

silverstripe-module silverstripe-helpers

Core extensions with default helpers

image

webfox/silverstripe-helpers

Core extensions with default helpers

  • Thursday, July 12, 2018
  • by hailwood
  • Repository
  • 2 Watchers
  • 2 Stars
  • 1,169 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 34 Versions
  • 4 % Grown

The README.md

Installation Instructions

Composer

Run the following to add this module as a requirement and install it via composer., (*1)

#!bash

composer require "webfox/silverstripe-helpers"

Add the following to your config.yml:, (*2)

Page:
  has_on_after_update_cms_fields: true

then browse to /dev/build?flush=all, (*3)

Several of these helpers are disabled by default but can be enabled in the config., (*4)

Requirements

  • Silverstripe 3.1+
  • php5.4+
  • php5-intl Package

Extension Overview

DataListExtension

  • Adds a new ListColumn function to a DataList to allow implode() style functionality of the list items
    e.g. $list->ListColumn('ID', ' |') would result in something like "1 |18 |19 |24".
  • Automatically applied

ExtraPageFieldsExtension

  • Moves the metadata fields to a new tab
  • Adds a new "Meta Title" field
  • Automatically applied

If you do not add the HasOnAfterUpdateCMSFieldsExtensionPoint trait to your base Page class then the extension will use an unreliable method of moving the pages. For this reason we suggest adding use HasOnAfterUpdateCMSFieldsExtensionPoint; to this class., (*5)

If you have a custom constructor already you will need to alias the traits constructor so you may call it., (*6)

class Page extends SiteTree {

    use HasOnAfterUpdateCMSFieldsExtensionPoint {
        HasOnAfterUpdateCMSFieldsExtensionPoint::__construct as __TraitConstruct;
    }

    public function __construct($record = null, $isSingleton = false, $model = null){

        $this->__TraitConstruct($record, $isSingleton, $model);

        //your custom things

        parent::__construct($record, $isSingleton, $model);
    }

}

Relative Assets Extension

  • Prefixes all references to assets/* with a preceeding slash i.e. they become something like /assets/some.png
  • If zaininnari/html-minifier is installed minifies the HTML output before rendering.
  • If Assets.host config is set then Assets will be prefixed with this host.
Assets:
  host: '//example.com/'

Would equal //example.com/assets/image.png, (*7)

FooterMenuExtension

  • Adds a new ShowInFooter option to the page settings
  • Adds a new FooterPages() function to the SiteTree to return only pages that have this checked

ImageExtension

  • Adds a new Image Alt Text option to the image settings
  • Makes the image settings fields full width
  • Automatically applied

LinkExtension

  • Adds a new SEO Text option to the link settings
  • Adds a force download checkbox to the link if it's set to a file.
  • Automatically applied

Template Providers Overview

HelpersTemplateProvider

  • Adds a new Repeat($times) function to the templates to return a loopable list (kind of like a for loop)
  • Adds a new Dump($obj) function to the templates to allow easy dumping of any template variable

Extendable Classes Overview

OwnerPermissionedDataObject

  • Allows data objects to inherit the access permissions from their attached relation parent
  • Relation parent defaults to Page()
  • If static::$relationOwner is set to null will fall back to asking the standard Page for permission

The Versions

12/07 2018

dev-master

9999999-dev

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

12/07 2018

v1.11.0

1.11.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

08/02 2018

v1.10.1

1.10.1.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

11/07 2017

v1.10.0

1.10.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

22/11 2016

v1.9.3

1.9.3.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

22/11 2016

v1.9.2

1.9.2.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

14/11 2016

v1.9.1

1.9.1.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

14/11 2016

v1.9.0

1.9.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

18/07 2016

v1.8.0

1.8.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

20/06 2016

dev-develop

dev-develop

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

20/06 2016

v1.7.0

1.7.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

20/05 2016

v1.6.4

1.6.4.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

03/05 2016

1.6.3

1.6.3.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

28/04 2016

1.6.2

1.6.2.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

14/04 2016

v1.6.1

1.6.1.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

14/04 2016

1.6.0

1.6.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

23/02 2016

1.5.0

1.5.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

29/11 2015

1.4.0

1.4.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

11/11 2015

v1.3.0

1.3.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

09/11 2015

v1.2.2

1.2.2.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

08/09 2015

v1.2.1

1.2.1.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

07/09 2015

v1.2.0

1.2.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

31/08 2015

v1.1.1

1.1.1.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

24/08 2015

v1.1.0

1.1.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

22/08 2015

v1.0.9

1.0.9.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

11/08 2015

v1.0.8

1.0.8.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

19/03 2015

v1.0.7

1.0.7.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

18/03 2015

v1.0.6

1.0.6.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

03/03 2015

v1.0.5

1.0.5.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

18/02 2015

v1.0.4

1.0.4.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

17/02 2015

v1.0.3

1.0.3.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

12/02 2015

v1.0.2

1.0.2.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

03/02 2015

v1.0.1

1.0.1.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox

03/02 2015

v1.0.0

1.0.0.0

Core extensions with default helpers

  Sources   Download

MIT

The Requires

 

by Matthew Hailwood

helpers silverstripe webfox