LayoutInterface.php 878 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Drupal\Core\Layout;
  3. use Drupal\Component\Plugin\DerivativeInspectionInterface;
  4. use Drupal\Component\Plugin\PluginInspectionInterface;
  5. use Drupal\Component\Plugin\ConfigurablePluginInterface;
  6. /**
  7. * Provides an interface for static Layout plugins.
  8. */
  9. interface LayoutInterface extends PluginInspectionInterface, DerivativeInspectionInterface, ConfigurablePluginInterface {
  10. /**
  11. * Build a render array for layout with regions.
  12. *
  13. * @param array $regions
  14. * An associative array keyed by region name, containing render arrays
  15. * representing the content that should be placed in each region.
  16. *
  17. * @return array
  18. * Render array for the layout with regions.
  19. */
  20. public function build(array $regions);
  21. /**
  22. * {@inheritdoc}
  23. *
  24. * @return \Drupal\Core\Layout\LayoutDefinition
  25. */
  26. public function getPluginDefinition();
  27. }