You are here

class ResponsiveLayout in Layout 8

Plugin annotation


@Plugin(
 id = "responsive_layout",
 derivative = "Drupal\rlayout\Plugin\Derivative\Layout"
)

Hierarchy

Expanded class hierarchy of ResponsiveLayout

File

lib/Drupal/rlayout/Plugin/layout/layout/ResponsiveLayout.php, line 21
Definition of Drupal\rlayout\Plugin\layout\layout\ResponsiveLayout.

Namespace

Drupal\rlayout\Plugin\layout\layout
View source
class ResponsiveLayout extends PluginBase implements LayoutInterface {

  /**
   * Overrides Drupal\Component\Plugin\PluginBase::__construct().
   */
  public function __construct(array $configuration, $plugin_id, DiscoveryInterface $discovery) {

    // Get definition by discovering the declarative information.
    $definition = $discovery
      ->getDefinition($plugin_id);
    foreach ($definition['regions'] as $region => $title) {
      if (!isset($configuration['regions'][$region])) {
        $configuration['regions'][$region] = array();
      }
    }
    parent::__construct($configuration, $plugin_id, $discovery);
  }

  /**
   * Implements Drupal\layout\Plugin\LayoutInterface::renderLayout().
   */
  public function renderLayout($admin = FALSE) {
    $definition = $this
      ->getDefinition();
    return '@todo Temporary';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LayoutInterface::getRegions public function Returns a list of regions. 1
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
ResponsiveLayout::renderLayout public function Implements Drupal\layout\Plugin\LayoutInterface::renderLayout(). Overrides LayoutInterface::renderLayout
ResponsiveLayout::__construct public function Overrides Drupal\Component\Plugin\PluginBase::__construct(). Overrides PluginBase::__construct