public function WordCount::render in Translation Management Tool 8
Same name in this branch
- 8 src/Plugin/views/field/WordCount.php \Drupal\tmgmt\Plugin\views\field\WordCount::render()
- 8 translators/tmgmt_local/src/Plugin/views/field/WordCount.php \Drupal\tmgmt_local\Plugin\views\field\WordCount::render()
Renders the field.
Parameters
\Drupal\views\ResultRow $values: The values retrieved from a single row of a view's query result.
Return value
string|\Drupal\Component\Render\MarkupInterface The rendered output. If the output is safe it will be wrapped in an object that implements MarkupInterface. If it is empty or unsafe it will be a string.
Overrides FieldPluginBase::render
File
- translators/
tmgmt_local/ src/ Plugin/ views/ field/ WordCount.php, line 18
Class
- WordCount
- Field handler which shows the word count for a job or job item.
Namespace
Drupal\tmgmt_local\Plugin\views\fieldCode
public function render(ResultRow $values) {
/** @var \Drupal\tmgmt_local\LocalTaskInterface $entity */
$entity = $values->_entity;
return $entity
->getWordCount();
}