View on GitHub

PHPStorm Templates for SilverStripe

This is a collection of file and live templates used for speeding up SilverStripe development.

Download this project as a .zip file Download this project as a tar.gz file

PHPStorm Templates for SilverStripe

Overview

This is a collection of file and live templates used for speeding up SilverStripe development.

Installation Instructions

Place the files into the correct folders in your configuration path and restart PHPStorm.

Linux

~/.WebIdeXX/config

OS X

~/Library/Preferences/WebIdeXX

Windows

<User home>\.WebIdeXX/config

<User home> in WindowsXP is C:\Documents and Settings\<User name>\ and in Windows Vista it is C:\Users\<User name>\

Usage Overview

File Templates

Simply select the template you want to use when creating a new file.

Live Templates

Tab complete abbreviations of common SilverStripe static properties and methods.

For example db expands to:

/**
 * List of database fields. {@link DataObject::$db}
 *
 * @var array
 */
private static $db = array(
    '' => ''
);

And cms expands to:

/**
 * Returns a FieldList with which to create the main editing form. {@link DataObject::getCMSFields()}
 *
 * @return FieldList The fields to be displayed in the CMS.
 */
public function getCMSFields()
{
    $fields = parent::getCMSFields();



    return $fields;
}