trait DBClassNameTrait (View source)

Properties

protected string|null $baseClass

Base classname of class to enumerate.

protected DataObject|null $record

Parent object

Methods

public
__construct(string $name = null, string|null $baseClass = null, array $options = [])

Create a new DBClassName field

public
string
getBaseClass()

Get the base dataclass for the list of subclasses

public
string|null
getShortName()

Get the base name of the current class Useful as a non-fully qualified CSS Class name in templates.

public
$this
setBaseClass(string $baseClass)

Assign the base class

public
array
getEnum()

Get list of classnames that should be selectable

public
setValue($value, $record = null, $markChanged = true)

No description

Details

__construct(string $name = null, string|null $baseClass = null, array $options = [])

Create a new DBClassName field

Parameters

string $name

Name of field

string|null $baseClass

Optional base class to limit selections

array $options

Optional parameters for this DBField instance

string getBaseClass()

Get the base dataclass for the list of subclasses

Return Value

string

string|null getShortName()

Get the base name of the current class Useful as a non-fully qualified CSS Class name in templates.

Return Value

string|null

$this setBaseClass(string $baseClass)

Assign the base class

Parameters

string $baseClass

Return Value

$this

array getEnum()

Get list of classnames that should be selectable

Return Value

array

setValue($value, $record = null, $markChanged = true)

No description

Parameters

$value
$record
$markChanged