WordCount.php in Translation Management Tool 8
File
src/Plugin/views/field/WordCount.php
View source
<?php
namespace Drupal\tmgmt\Plugin\views\field;
use Drupal\tmgmt\JobInterface;
use Drupal\views\ResultRow;
class WordCount extends StatisticsBase {
public function render(ResultRow $values) {
$entity = $this
->getEntity($values);
if ($entity instanceof JobInterface && $entity
->isContinuous()) {
return;
}
return $entity
->getWordCount();
}
}
Classes
Name |
Description |
WordCount |
Field handler which shows the word count for a job or job item. |