TwoColumnLayout.php

Same filename and directory in other branches
  1. 9 core/modules/layout_builder/src/Plugin/Layout/TwoColumnLayout.php
  2. 8.9.x core/modules/layout_builder/src/Plugin/Layout/TwoColumnLayout.php
  3. 10 core/modules/layout_builder/src/Plugin/Layout/TwoColumnLayout.php

Namespace

Drupal\layout_builder\Plugin\Layout

File

core/modules/layout_builder/src/Plugin/Layout/TwoColumnLayout.php

View source
<?php

namespace Drupal\layout_builder\Plugin\Layout;


/**
 * Configurable two column layout plugin class.
 *
 * @internal
 *   Plugin classes are internal.
 */
class TwoColumnLayout extends MultiWidthLayoutBase {
    
    /**
     * {@inheritdoc}
     */
    protected function getWidthOptions() {
        return [
            '50-50' => '50%/50%',
            '33-67' => '33%/67%',
            '67-33' => '67%/33%',
            '25-75' => '25%/75%',
            '75-25' => '75%/25%',
        ];
    }
    
    /**
     * {@inheritdoc}
     */
    protected function getDefaultWidth() {
        return '50-50';
    }

}

Classes

Title Deprecated Summary
TwoColumnLayout Configurable two column layout plugin class.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.