Download the PHP package twohill/silverstripe-nestedcontrollers without Composer

On this page you can find all versions of the php package twohill/silverstripe-nestedcontrollers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-nestedcontrollers

NESTED CONTROLLERS SNIPPET FOR SILVERSTRIPE

About

This isn't really a module, but I've re-used it with many projects now so I figured it deserved to be shared. It enables you to create a logical url structure for actions on records (DataObjects).

For example, it can be used for CRUD (Create Read Update Delete), or to step through required processes of creating an object in a logical way

eg: /mypage/people/12/edit /mypage/people/12/favourite-people

It allows deep traversal through related objects:

eg: /mypage/people/12/mother/uncles/43/edit

And it allows for easy theme overrides. [Record]_[function].ss templates are chosen ahead of [Record].ss templates. And there are fallback templates to kick you off.

How to use

As a starting point, you need a page that can call the nested functions. eg

<?php
class MyPage extends Page {
    //...
}
class MyPage_Controller extends Page_Controller {
    //..
    public function people($request) {
        return new PeopleCollectionController($this, $request);
    }
}

This means that whenever anyone calls a MyPage/people, the PeopleCollectionController will be used.

Obviously you need a PeopleCollectionController so lets have a look at what it might look like.

<?php
class PeopleCollectionCotroller extends NestedCollectionController {
    public function favourite_people() {
        // return something allowing the user to view or modify favourite people
    }
}

All versions of silverstripe-nestedcontrollers with dependencies

PHP Build Version
Package Version
Requires silverstripe/vendor-plugin Version ^1.0
silverstripe/framework Version ^4
silverstripe/errorpage Version ^1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package twohill/silverstripe-nestedcontrollers contains the following files

Loading the files please wait ....