You are here

class MiconParagraphsTypeListBuilder in Micon 2.x

Same name and namespace in other branches
  1. 8 micon_paragraphs/src/MiconParagraphsTypeListBuilder.php \Drupal\micon_paragraphs\MiconParagraphsTypeListBuilder

Provides a listing of ParagraphsType.

Hierarchy

Expanded class hierarchy of MiconParagraphsTypeListBuilder

File

micon_paragraphs/src/MiconParagraphsTypeListBuilder.php, line 11

Namespace

Drupal\micon_paragraphs
View source
class MiconParagraphsTypeListBuilder extends ParagraphsTypeListBuilder {

  /**
   * {@inheritdoc}
   */
  public function buildRow(EntityInterface $entity) {
    $row = parent::buildRow($entity);
    if (isset($row['icon_file'])) {
      $icon = micon_paragraphs_icon($entity);
      if ($icon) {
        $row['icon_file'] = [];
        $row['icon_file']['data']['#markup'] = micon()
          ->setIcon($icon);
      }
    }
    return $row;
  }

}

Members