2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-collection

Display a filterable collection of pages or dataobjects on a page.

image

dynamic/silverstripe-collection

Display a filterable collection of pages or dataobjects on a page.

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 3 Open issues
  • 10 Versions
  • 23 % Grown

The README.md

Silverstripe Collection

Display a filterable collection of pages or dataobjects on a page., (*1)

Build Status Scrutinizer Code Quality Code Coverage Build Status codecov, (*2)

Latest Stable Version Total Downloads Latest Unstable Version License, (*3)

Requirements

  • SilverStripe 4.x

Installation

composer require dynamic/silverstripe-collection, (*4)

Configuration

In your config.yml:, (*5)

Your/Namespace/ExamplePageController:
  managed_object: ExampleObject
  page_size: 10
  extensions:
    - Dynamic\Collection\CollectionExtension

Managed Page/DataObject

Collection will create a search form based on the managed object's $searchable_fields., (*6)

private static $searchable_fields = [
  'Title' => [
    'title' => 'Name',
  ],
  'Category.ID' => [
    'title' => 'Category',
  ],
];

For advanced setups, you can also create getCustomSearchContext() on your managed object., (*7)

To include a sorting dropdown field, create a getSortOptions() method on your managed object:, (*8)

public function getSortOptions()
{
  return array(
    'Created' => 'Date',
    'Title' => 'Name A-Z',
    'Title DESC' => 'Name Z-A',
  );
}

Templates

$CollectionSearchForm will display the search form., (*9)

You have mutliple options to loop through the results in your template:, (*10)

  • $Collection will display a list of all results
  • $PaginatedList will paginate the results
  • $GroupedList.GroupedBy(CategoryTitle) will display results grouped by the variable you pass

Documentation

See the docs/en folder., (*11)

The Versions

18/06 2018

dev-master

9999999-dev

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe

18/06 2018

2.0.0-beta2

2.0.0.0-beta2

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe

14/06 2018

2.0.0-beta1

2.0.0.0-beta1

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe

15/02 2018

1.0.x-dev

1.0.9999999.9999999-dev

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe

15/02 2018

1.0.0-beta3

1.0.0.0-beta3

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe

07/12 2017

dev-branch-alias

dev-branch-alias

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe

11/07 2017

1.0.0-beta2

1.0.0.0-beta2

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe

08/07 2017

2.0.0-alpha1

2.0.0.0-alpha1

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe

06/03 2017

1.0.0-beta1

1.0.0.0-beta1

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe

14/02 2017

1.0.0-alpha1

1.0.0.0-alpha1

Display a filterable collection of pages or dataobjects on a page.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe