public function Expert::defaultConfiguration in Display Suite 8.2
Same name and namespace in other branches
- 8.4 src/Plugin/DsFieldTemplate/Expert.php \Drupal\ds\Plugin\DsFieldTemplate\Expert::defaultConfiguration()
- 8.3 src/Plugin/DsFieldTemplate/Expert.php \Drupal\ds\Plugin\DsFieldTemplate\Expert::defaultConfiguration()
Creates default configuration for the layout.
Overrides DsFieldTemplateBase::defaultConfiguration
File
- src/
Plugin/ DsFieldTemplate/ Expert.php, line 176
Class
- Expert
- Plugin for the expert field template.
Namespace
Drupal\ds\Plugin\DsFieldTemplateCode
public function defaultConfiguration() {
$config = array();
$config['lb'] = '';
$config['lb-col'] = \Drupal::config('ds.settings')
->get('ft-show-colon');
$wrappers = array(
'lb' => array(
'title' => $this
->t('Label'),
),
'lbw' => array(
'title' => $this
->t('Label wrapper'),
),
'ow' => array(
'title' => $this
->t('Outer wrapper'),
),
'fis' => array(
'title' => $this
->t('Field items'),
),
'fi' => array(
'title' => $this
->t('Field item'),
),
);
foreach ($wrappers as $wrapper_key => $value) {
$config[$wrapper_key] = FALSE;
$config[$wrapper_key . '-el'] = '';
$config[$wrapper_key . '-at'] = '';
$config[$wrapper_key . '-cl'] = '';
$config[$wrapper_key . '-def-at'] = FALSE;
$config[$wrapper_key . '-def-cl'] = FALSE;
}
return $config;
}