\DataObjectPicker
Original built by Andreas Piening <andreas (at) silverstripe (dot) com> Modified for SilverStripe 3.1 Linkable Objects module by Sam Costigan <sam (at) stripetheweb (dot) com>
Synopsis
class DataObjectPicker
extends TextField
{
- // members
- private static array $allowed_actions = ;
- protected array $config = ;
- // methods
- public void Field()
- public void setConfig()
- public void FieldHolder()
- public void Suggest()
- public JSON Get()
- private void getSuggestions()
- protected void classToPick()
- protected void summaryFields()
- public void performReadonlyTransformation()
Hierarchy
Extends
- TextField
Members
private
- $allowed_actions
protected
-
$config
$config holds all the Configuration values for the DataObjectPicker
Methods
private
protected
- classToPick() — Get class to pick objects from, uses DataObjectPicker::config['classToPick'] and if empty tries to resolve the class by looking up the records has_one relations. Set $name properly for this to work.
- summaryFields() — Get summaryFields to describe the suggested DataObjects, uses DataObjectPicker::config['summaryFields'] and if empty tries to guess by looking into the static $summary_fields of the classToPick(). Set static $summary_fields properly for the guessing to work.
public
- Field()
- FieldHolder() — Return field holder to the form
- Get() — Get a specific Object based on the ID passed as the request parameter and return the objects title
- Suggest() — Call lookup callback and pass it the request Use DataObjectPicker::setConfig() to specify a callback.
- performReadonlyTransformation() — Return a @return DataObjectPicker instance that is readonly
- setConfig() — Set some configuration parameters that differ from what DataObject would expect or unguessable