CodeExplorer getDefaultWidth example
abstract class MultiWidthLayoutBase extends LayoutDefault
implements PluginFormInterface
{ /**
* {@inheritdoc}
*/
public function defaultConfiguration() { $configuration = parent::
defaultConfiguration();
return $configuration +
[ 'column_widths' =>
$this->
getDefaultWidth(),
];
} /**
* {@inheritdoc}
*/
public function buildConfigurationForm(array
$form, FormStateInterface
$form_state) { $form['column_widths'
] =
[ '#type' => 'select',
'#title' =>
$this->
t('Column widths'
),
'#default_value' =>
$this->configuration
['column_widths'
],