public function WebformOptionsListBuilder::buildRow in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformOptionsListBuilder.php \Drupal\webform\WebformOptionsListBuilder::buildRow()
Builds a row for an entity in the entity listing.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list.
Return value
array A render array structure of fields for this entity.
Overrides EntityListBuilder::buildRow
See also
\Drupal\Core\Entity\EntityListBuilder::render()
File
- src/
WebformOptionsListBuilder.php, line 144
Class
- WebformOptionsListBuilder
- Defines a class to build a listing of webform options entities.
Namespace
Drupal\webformCode
public function buildRow(EntityInterface $entity) {
/** @var \Drupal\webform\WebformOptionsInterface $entity */
$row['label'] = $entity
->toLink($entity
->label(), 'edit-form');
$row['category'] = $entity
->get('category');
$row['likert'] = $entity
->isLikert() ? $this
->t('Yes') : $this
->t('No');
$row['alter'] = $entity
->hasAlterHooks() ? $this
->t('Yes') : $this
->t('No');
$row['options'] = $this
->buildOptions($entity);
$row['used_by'] = $this
->buildUsedBy($entity);
return $row + parent::buildRow($entity);
}