Download the PHP package fromholdio/silverstripe-minigridfield without Composer

On this page you can find all versions of the php package fromholdio/silverstripe-minigridfield. 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-minigridfield

silverstripe-minigridfield

A field that preconfigures and gently themes a GridField to result in a "mini" inline grid field.

Two field types are included:

Auto-magically handles (preconfigures, with a few flags available to devs) orderable rows, add new multi class, versioning.

Requirements

Installation

composer require fromholdio/silverstripe-minigridfield

Screenshots

Complete Example

This is an example showing a has one, has many and many many:

use Fromholdio\MiniGridField\Forms\HasOneMiniGridField;
use Fromholdio\MiniGridField\Forms\MiniGridField;
use SilverStripe\Admin\ModelAdmin;
use SilverStripe\ORM\DataObject;

class TestAdmin extends ModelAdmin {
    private static $menu_title = 'Test';
    private static $url_segment = 'test';
    private static $managed_models = [
        Radio::class,
        Owner::class,
        Presenter::class,
        Listener::class,
    ];
}

class Radio extends DataObject {
    private static $db = ['Title' => 'Varchar'];
    private static $has_one = ['Owner' => Owner::class];
    private static $has_many = ['Presenters' => Presenter::class];
    private static $many_many = ['Listeners' => Listener::class];
    public function getCMSFields() {
        $fields = parent::getCMSFields();

        $fields->replaceField('OwnerID', HasOneMiniGridField ::create('Owner', 'Owner', $this));

        $fields->removeByName('Presenters');
        $fields->insertAfter('Title', MiniGridField::create('Presenters', 'Presenters', $this));

        $fields->removeByName('Listeners');
        $fields->insertAfter('Title', MiniGridField::create('Listeners', 'Listeners', $this));

        return $fields;
    }
}

class Owner extends DataObject {
    private static $db = ['Title' => 'Varchar'];
    private static $has_many = ['Radio' => Radio::class];
}

class Presenter extends DataObject {
    private static $db = ['Title' => 'Varchar'];
    private static $has_one = ['Radio' => Radio::class];
}

class Listener extends DataObject {
    private static $db = ['Title' => 'Varchar'];
    private static $belongs_many_many = ['Radios' => Radio::class];
}

Replacing GridField universally

For projects that you'd like to replace all GridFields with MiniGridField, you can use the Injector to do so in a few lines of config:

Thanks & Acknowledgements

There are a few more, can't find them right now, will list them here soon. I've worked hard on getting this working how I want it, but took direction from some of the wonderful peeps and their code above, thanks.


All versions of silverstripe-minigridfield with dependencies

PHP Build Version
Package Version
Requires silverstripe/vendor-plugin Version ~1.0 || ~2.0
silverstripe/framework Version ~4.2 || ~5.0
fromholdio/silverstripe-gridfield-limiter Version ^1.0.0 || ^2.0.0
stevie-mayhew/hasoneedit Version ^2.3.0
symbiote/silverstripe-gridfieldextensions Version ^3.0.0 || ^4.0.0
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 fromholdio/silverstripe-minigridfield contains the following files

Loading the files please wait ....