theme.inc in Display Suite 6.3
File
plugins/ds_field/theme.inc
View source
<?php
$plugin = array(
'type' => DS_FIELD_TYPE_THEME,
'name' => t('Theme field'),
'description' => t('The default field type. Renders content using a theme function'),
'class' => 'dsFieldTheme',
);
class dsFieldTheme extends dsField {
public function formatContent() {
$content = NULL;
if (isset($this->settings['formatter'])) {
if (isset($this->settings['file'])) {
include_once $this->settings['file'];
}
$this->content = theme($this->settings['formatter'], $this->settings);
return $this->content;
}
return FALSE;
}
}