PHPackages                             suilven/silverstripe-terms-and-conditions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. suilven/silverstripe-terms-and-conditions

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

suilven/silverstripe-terms-and-conditions
=========================================

Add a terms and conditions field to a SilverStripe form.

0.0.6(7y ago)022BSD-3-ClauseJavaScriptPHP &gt;=5.6.0

Since Jun 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/gordonbanderson/silverstripe-terms-and-conditions)[ Packagist](https://packagist.org/packages/suilven/silverstripe-terms-and-conditions)[ Docs](https://github.com/suilven/silverstripe-terms-and-conditions)[ RSS](/packages/suilven-silverstripe-terms-and-conditions/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (7)Used By (0)

SilverStripe Module Starter
===========================

[](#silverstripe-module-starter)

A starter kit that has everything you need to get underway with a new module for [SilverStripe v4](https://github.com/silverstripe/silverstripe-framework).

Contents
--------

[](#contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Issues](#issues)
- [Contribution](#contribution)
- [Maintainers](#maintainers)
- [License](#license)

Requirements
------------

[](#requirements)

- Git
- PHP
- Node.js
- Yarn (or npm)

Installation
------------

[](#installation)

Using `git`, clone the repo to a location of your choice:

```
$ git clone https://github.com/praxisnetau/silverstripe-module-starter ./my-repo-name
```

After the repo has cloned, you will need to run the `setup.php` script:

```
$ cd my-repo-name
$ php ./setup.php
```

The setup script will ask a series of questions to gather data about your new module:

```
$ php ./setup.php
================================================================================
SILVERSTRIPE MODULE SETUP
================================================================================
> Loading config file...
> Checking files...
> Files OK!
> Gathering setup data...
Vendor (default "vendor"): examplecorp
Module (default "module"): awesome-module
Repository name (default "examplecorp/awesome-module"):
Repository URL (default "https://github.com/examplecorp/awesome-module"):
Module name (default "My SilverStripe Module"): My Awesome Module
Namespace (PSR-4) (default "Vendor\Module"): Example\Awesome
Description: An awesome new SilverStripe module.
Author (default "My Name"): Jane Bloggs
Email (default "name@example.com"): jane@example.com
Organisation (default "My Organisation"): Example Corp
Homepage (default "https://www.example.com"):
Keywords (comma-separated): silverstripe, example
```

If a question has a default value, just hit enter to accept the default.

After answering each question, the script will then process the necessary files by replacing named tokens in each file with the corresponding setup value.

By default, these files are:

- `_config.php`
- `_config/config.yml`
- `admin/client/src/bundles/bundle.js`
- `admin/client/src/styles/_variables.scss`
- `admin/client/src/styles/bundle.scss`
- `client/src/bundles/bundle.js`
- `client/src/styles/_variables.scss`
- `client/src/styles/bundle.scss`
- `composer.json`
- `package.json`
- `webpack.config.js`

Each file needs to readable and writable. The setup script will first verify that it can process each file before proceeding.

Configuration
-------------

[](#configuration)

The setup script supports a `setup.json` file kept in the same location as `setup.php`. Using this file, you can override any of the default configuration settings. By forking the repo and adding your own settings to this file, you can save yourself even more typing. For example:

```
{
  "default-vendor": "examplecorp",
  "default-author": "Jane Bloggs",
  "default-email": "jane@example.com",
  "default-organisation": "Example Corp",
  "default-homepage": "https://www.example.com"
}
```

Usage
-----

[](#usage)

The module comes pre-configured with everything you need to get underway. Frontend resources are processed and bundled using [webpack](https://webpack.js.org), and the included config is ready to create bundles for both the website and the CMS. Your admin bundles will be included in the CMS automatically (see [config.yml](_config/config.yml)), however you will need to handle loading the website bundles yourself, e.g. by using `Requirements` in your controller.

A `yarn.lock` file is included with the repo. To install build dependencies, run:

```
$ yarn install
```

This will download all of the build dependencies into the `node_modules` folder. Two scripts are pre-configured for Yarn, `watch` for development, and `build` for production:

```
$ yarn watch
```

This will watch your source files and automatically recompile when a change is detected.

```
$ yarn build
```

This will prepare your files for distribution by clearing the `dist/` folders and compiling + optimising the created bundles.

### Bundles

[](#bundles)

Using the default webpack config, bundle files will be created from your source files in two locations:

- `admin/client/dist/`
- `client/dist/`

These folders are exposed by default within the `composer.json` file, so that when your module is installed into a SilverStripe v4 app, these folders are automatically exposed in the `resources/` folder.

To include your module bundles for the website, you'll need to load your `dist/` bundles, for example by using the SilverStripe `Requirements` class in your controller (where `vendor/module` is your repository name):

```
use SilverStripe\View\Requirements;

Requirements::css('vendor/module: client/dist/styles/bundle.css');
Requirements::javascript('vendor/module: client/dist/js/bundle.js');
```

### Source

[](#source)

The webpack build relies on two pairs of source bundle files for the CMS and website:

- `admin/client/src/bundles/bundle.js`
- `admin/client/src/styles/bundle.scss`
- `client/src/bundles/bundle.js`
- `client/src/styles/bundle.scss`

Each `bundle.js` file will pull in any required JavaScript and Sass styles. By default, each `bundle.js`requires the `bundle.scss` file to load your styles. Each `bundle.scss` file imports variables from the `_variables.scss` file by default.

The general idea is to add your own JavaScript under each `src/` folder for anything you need, and to add your styles as `.scss` files under the `src/styles/` folder. Then edit each bundle to require or import your source files. For example:

#### Example Script Bundle

[](#example-script-bundle)

```
/* Module Bundle
===================================================================================================================== */

// Load Styles:

require('styles/bundle.scss');

// Load Scripts:

require('pages/MyPage.js');
```

This would require the file `src/pages/MyPage.js`.

#### Example Style Bundle

[](#example-style-bundle)

```
/* Module Bundle
===================================================================================================================== */

// Import Variables:

@import "variables";

// Import Styles:

@import "pages/MyPage";
```

This would import the file `src/styles/pages/MyPage.scss`.

### Icons

[](#icons)

Copy any icon files required for your SilverStripe page classes into the `admin/client/src/images/icons/` folder. These images will be copied to the `admin/client/dist/` folder upon `watch` or `build`. You can reference these icons in your classes by using the following notation (where `vendor/module` is your repository name):

```
class MyPage extends Page
{
    private static $icon = 'vendor/module: admin/client/dist/images/icons/MyPage.png';
}
```

Issues
------

[](#issues)

Please use the [GitHub issue tracker](https://github.com/praxisnetau/silverstripe-module-starter/issues) for bug reports and feature requests.

Contribution
------------

[](#contribution)

Your contributions are gladly welcomed to help make this project better. Please see [contributing](CONTRIBUTING.md) for more information.

Maintainers
-----------

[](#maintainers)

[![Colin Tucker](https://avatars3.githubusercontent.com/u/1853705?s=144)](https://github.com/colintucker)[![Praxis Interactive](https://avatars2.githubusercontent.com/u/1782612?s=144)](http://www.praxis.net.au)[Colin Tucker](https://github.com/colintucker)[Praxis Interactive](http://www.praxis.net.au)License
-------

[](#license)

[BSD-3-Clause](LICENSE.md) © Praxis Interactive

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

2895d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/770fae946ca5ca8f0f1f0179462c84d3ca60e9bd32cac3f522fdb64c2e384789?d=identicon)[suilven](/maintainers/suilven)

---

Top Contributors

[![gordonbanderson](https://avatars.githubusercontent.com/u/7060?v=4)](https://github.com/gordonbanderson "gordonbanderson (22 commits)")

---

Tags

legalconditionstermsand

### Embed Badge

![Health badge](/badges/suilven-silverstripe-terms-and-conditions/health.svg)

```
[![Health](https://phpackages.com/badges/suilven-silverstripe-terms-and-conditions/health.svg)](https://phpackages.com/packages/suilven-silverstripe-terms-and-conditions)
```

###  Alternatives

[comcast/php-legal-licenses

A utility to generate a Licenses file containing the full license text for every dependency in your project for legal purposes.

821.1M9](/packages/comcast-php-legal-licenses)[aliziodev/laravel-taxonomy

Laravel Taxonomy is a flexible and powerful package for managing taxonomies, categories, tags, and hierarchical structures in Laravel applications. Features nested-set support for optimal query performance on hierarchical data structures.

23318.4k](/packages/aliziodev-laravel-taxonomy)[setono/sylius-terms-plugin

Sylius terms and conditions plugin

3684.5k](/packages/setono-sylius-terms-plugin)[terminal42/contao-conditionalformfields

conditionalformfields extension for Contao Open Source CMS; Display form fields based on conditionis!

2168.5k1](/packages/terminal42-contao-conditionalformfields)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
