Apple_Exporter\Components\Component::register_full_width_layout PHP Method

register_full_width_layout() protected method

Register a new layout which will be displayed as full-width, so no need to specify columnStart and columnSpan in the layout specs. This is useful because when the body is centered, the full-width layout spans the same columns as the body.
protected register_full_width_layout ( string $name, array $spec )
$name string
$spec array
    protected function register_full_width_layout($name, $spec)
    {
        // Initial colStart and colSpan
        $col_start = 0;
        $col_span = $this->get_setting('layout_columns');
        // If the body is centered, don't span the full width, but the same with of
        // the body.
        if ('center' == $this->get_setting('body_orientation')) {
            $col_start = floor(($this->get_setting('layout_columns') - $this->get_setting('body_column_span')) / 2);
            $col_span = $this->get_setting('body_column_span');
        }
        $this->register_layout($name, array_merge(array('columnStart' => $col_start, 'columnSpan' => $col_span), $spec));
    }