/** * LayoutInterface constructor. * @param $theme_name * @param $active_regions */ public function __construct($theme_name, $active_regions) { $this->theme_name = $theme_name; $this->active_regions = $active_regions; $layout_data = new LayoutCompatible($this->theme_name); $layout_compatible_data = $layout_data->getCompatibleLayout(); $this->layout_config = $layout_compatible_data['layout_config']; }
public function __construct($theme_name, $values) { $this->theme_name = $theme_name; $layout_data = new LayoutCompatible($this->theme_name); $layout_compatible_data = $layout_data->getCompatibleLayout(); $this->layout_config = $layout_compatible_data['layout_config']; $this->css_config = $layout_compatible_data['css_config']; $this->layout_name = $layout_compatible_data['layout_name']; $this->layout_path = drupal_get_path('theme', $this->layout_config['layout_provider']) . '/layout/' . $this->layout_name; $this->form_values = $values; }
<?php use Drupal\at_core\Layout\LayoutCompatible; use Drupal\at_core\Theme\ThemeInfo; use Drupal\at_core\Theme\ThemeSettingsInfo; use Drupal\Component\Utility\Html; $layout_data = new LayoutCompatible($theme); $layout_compatible_data = $layout_data->getCompatibleLayout(); $layout_config = $layout_compatible_data['layout_config']; $css_config = $layout_compatible_data['css_config']; // Prepare variables for getting the visual layout thingee CSS file. $provider_path = drupal_get_path('theme', $css_config['layout_provider']) . '/layout/' . $css_config['layout']; // Breakpoints $breakpoints_group_layout = theme_get_setting('settings.breakpoint_group_layout', $theme); $layout_breakpoints = $breakpoints[$breakpoints_group_layout]; // Template suggestions $template_suggestions = array(); $template_suggestions['page'] = 'page'; // Get the suggestions from config. // Each time a new suggestion is created we will save it to config settings during submit. foreach ($config as $config_key => $config_value) { if (substr($config_key, 0, 16) == 'suggestion_page_') { if (!empty($config_value) && $config_value !== 'page') { $clean_config_value = Html::escape($config_value);