You are here

public function LoopCount::render in Translation Management Tool 8

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/LoopCount.php, line 18

Class

LoopCount
Field handler which shows the word count for a job or job item.

Namespace

Drupal\tmgmt_local\Plugin\views\field

Code

public function render(ResultRow $values) {

  /** @var \Drupal\tmgmt_local\LocalTaskInterface $entity */
  $entity = $values->_entity;
  return $entity
    ->getLoopCount();
}