public function FlowLabel::render in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x modules/cms_content_sync_views/src/Plugin/views/field/FlowLabel.php \Drupal\cms_content_sync_views\Plugin\views\field\FlowLabel::render()
- 2.0.x modules/cms_content_sync_views/src/Plugin/views/field/FlowLabel.php \Drupal\cms_content_sync_views\Plugin\views\field\FlowLabel::render()
inheritdoc}
Parameters
\Drupal\views\ResultRow $values:
Return value
\Drupal\Component\Render\MarkupInterface|TranslatableMarkup|ViewsRenderPipelineMarkup|string
Overrides FieldPluginBase::render
File
- modules/
cms_content_sync_views/ src/ Plugin/ views/ field/ FlowLabel.php, line 49
Class
- FlowLabel
- Views Field handler for the flow label.
Namespace
Drupal\cms_content_sync_views\Plugin\views\fieldCode
public function render(ResultRow $values) {
/**
* @var \Drupal\cms_content_sync\Entity\Pool $entity
*/
$entity = $values->_entity;
$flow = \Drupal::entityTypeManager()
->getStorage('cms_content_sync_flow')
->load($entity
->get('flow')->value);
if (isset($flow)) {
return $flow
->label();
}
else {
return '';
}
}