Error message

  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1075 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1079 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1075 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1079 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1075 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1079 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1075 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1079 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1075 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1079 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1075 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Notice: Undefined property: stdClass::$preferred in _api_make_match_link() (line 1079 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).

public function ParagraphsTypeListBuilder::buildRow

File

paragraphs/src/Controller/ParagraphsTypeListBuilder.php, line 30

Class

ParagraphsTypeListBuilder
Provides a listing of ParagraphsType.

Namespace

Drupal\paragraphs\Controller

Code

public function buildRow(EntityInterface $entity) {
  $row['icon_file'] = [];
  if ($icon_url = $entity
    ->getIconUrl()) {
    $row['icon_file']['class'][] = 'paragraphs-type-icon';
    $row['icon_file']['data'] = [
      '#theme' => 'image',
      '#uri' => $icon_url,
      '#width' => 32,
      '#height' => 32,
    ];
  }
  $row['label'] = $entity
    ->label();
  $row['id'] = $entity
    ->id();
  $row['description']['data'] = [
    '#markup' => $entity
      ->getDescription(),
  ];

  // You probably want a few more properties here...
  return $row + parent::buildRow($entity);
}