X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Fsrc%2FPlugin%2Fviews%2Ffield%2FLastTimestamp.php;fp=web%2Fcore%2Fmodules%2Fcomment%2Fsrc%2FPlugin%2Fviews%2Ffield%2FLastTimestamp.php;h=bbae18d54fdb88461dd5098315859fdd8ee9279b;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/core/modules/comment/src/Plugin/views/field/LastTimestamp.php b/web/core/modules/comment/src/Plugin/views/field/LastTimestamp.php new file mode 100644 index 000000000..bbae18d54 --- /dev/null +++ b/web/core/modules/comment/src/Plugin/views/field/LastTimestamp.php @@ -0,0 +1,41 @@ +additional_fields['comment_count'] = 'comment_count'; + } + + /** + * {@inheritdoc} + */ + public function render(ResultRow $values) { + $comment_count = $this->getValue($values, 'comment_count'); + if (empty($this->options['empty_zero']) || $comment_count) { + return parent::render($values); + } + else { + return NULL; + } + } + +}