Sunnysideup\Ecommerce\Forms\Fields\OptionalTreeDropdownField
TreeDropdown-like field that gives you a tree of items including an empty field, using ajax.
Author: Marijn Kampf www.exadium.com
Date: 24 Nov 2009
Version: 2.2
Revision date: 9 May 2011
Changes: Fixed ajax sub tree request
Revision date: 8 October 2010
Changes: Changed $this->postTree to OptionalTreeDropdownField::$postTree to avoid Undefined error
Revision date: 17 June 2010
Changes: Updated to work with SilverStripe 2.4, tree function added.
Synopsis
class OptionalTreeDropdownField
extends TreeDropdownField
{
- // members
- private static array $allowed_actions = ;
- private static string $postTree = '</ul>';
Hierarchy
Extends
- SilverStripe\Forms\TreeDropdownField
Members
private
- $allowed_actions
-
$postTree
Define once rather than defining same line twice.
Methods
public
- getField()
- preTree() — Helper function to return the header (rather than defining same line twice).
- tree() — Get the whole tree of a part of the tree via an AJAX request with empty / none item prepended.