summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Render
diff options
context:
space:
mode:
authorLee Rowlands2018-09-25 06:44:48 (GMT)
committerwebchick2018-11-12 19:36:39 (GMT)
commitc1b4712244956438d399868c0a2e7b71c4c43255 (patch)
tree89f748a54e5ae3aa21d603b9c9fcb7d6f756c0c5 /core/lib/Drupal/Core/Render
parent1f79c156b702d3e86aff8e698fff70a1a72ceaf4 (diff)
Issue #2992410 by tim.plunkett, scottsawyer, sugaroverflow, phenaproxima: Provide placeholders for empty blocks (for example, an empty Views listing)
(cherry picked from commit 53f1980711f5c0cbd11384138a4e8f2c1f36c31b)
Diffstat (limited to 'core/lib/Drupal/Core/Render')
-rw-r--r--core/lib/Drupal/Core/Render/PlaceholderInterface.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/lib/Drupal/Core/Render/PlaceholderInterface.php b/core/lib/Drupal/Core/Render/PlaceholderInterface.php
new file mode 100644
index 0000000..cc8ff6e
--- /dev/null
+++ b/core/lib/Drupal/Core/Render/PlaceholderInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+namespace Drupal\Core\Render;
+
+/**
+ * Allows an element to provide a placeholder representation of itself.
+ */
+interface PlaceholderInterface {
+
+ /**
+ * Returns a string to be used as a placeholder.
+ *
+ * This is typically used when an element has no output and must be displayed,
+ * for example during configuration.
+ *
+ * @return string|\Drupal\Core\StringTranslation\TranslatableMarkup
+ * A placeholder string for this element.
+ */
+ public function getPlaceholderString();
+
+}