Version 1
[yaffs-website] / web / core / modules / dblog / src / Plugin / views / field / DblogOperations.php
diff --git a/web/core/modules/dblog/src/Plugin/views/field/DblogOperations.php b/web/core/modules/dblog/src/Plugin/views/field/DblogOperations.php
new file mode 100644 (file)
index 0000000..49a47fd
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+namespace Drupal\dblog\Plugin\views\field;
+
+use Drupal\views\Plugin\views\field\FieldPluginBase;
+use Drupal\views\ResultRow;
+
+/**
+ * Provides a field handler that renders operation link markup.
+ *
+ * @ingroup views_field_handlers
+ *
+ * @ViewsField("dblog_operations")
+ */
+class DblogOperations extends FieldPluginBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function clickSortable() {
+    return FALSE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function render(ResultRow $values) {
+    $value = $this->getValue($values);
+    return $this->sanitizeValue($value, 'xss_admin');
+  }
+
+}