class dsFieldFunction in Display Suite 6.3
The function field type
Hierarchy
- class \dsField
- class \dsFieldFunction
Expanded class hierarchy of dsFieldFunction
1 string reference to 'dsFieldFunction'
- function.inc in plugins/
ds_field/ function.inc
File
- plugins/
ds_field/ function.inc, line 17
View source
class dsFieldFunction extends dsField {
/**
* Format content for use in an item
*/
public function formatContent() {
$content = NULL;
if (isset($this->settings['function'])) {
// Load includes
if (isset($this->settings['file'])) {
include_once $this->settings['file'];
}
// If its a function, call it
if (isset($this->settings['function']) && !empty($this->settings['function'])) {
if (function_exists($this->settings['function'])) {
$this->content = call_user_func($this->settings['function'], $this->settings);
return $this->content;
}
}
}
return FALSE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
dsField:: |
protected | property | Field attributes | |
dsField:: |
public | property | Content for the field | |
dsField:: |
public | property | Field key | |
dsField:: |
public | property | Field settings | |
dsField:: |
function | Build an individual field value | ||
dsField:: |
protected | function | Return default values for a field | |
dsField:: |
function | Get content for use in a field. | ||
dsField:: |
public | function | Initialise field defaults | |
dsField:: |
public | function | Return a value for a field or group | 1 |
dsField:: |
public | function | Wrapper to set a value on a field | |
dsFieldFunction:: |
public | function |
Format content for use in an item Overrides dsField:: |