PostTypeListBuilder.php in Open Social 10.3.x
Same filename and directory in other branches
- 8.9 modules/social_features/social_post/src/PostTypeListBuilder.php
- 8 modules/social_features/social_post/src/PostTypeListBuilder.php
- 8.2 modules/social_features/social_post/src/PostTypeListBuilder.php
- 8.3 modules/social_features/social_post/src/PostTypeListBuilder.php
- 8.4 modules/social_features/social_post/src/PostTypeListBuilder.php
- 8.5 modules/social_features/social_post/src/PostTypeListBuilder.php
- 8.6 modules/social_features/social_post/src/PostTypeListBuilder.php
- 8.7 modules/social_features/social_post/src/PostTypeListBuilder.php
- 8.8 modules/social_features/social_post/src/PostTypeListBuilder.php
- 10.0.x modules/social_features/social_post/src/PostTypeListBuilder.php
- 10.1.x modules/social_features/social_post/src/PostTypeListBuilder.php
- 10.2.x modules/social_features/social_post/src/PostTypeListBuilder.php
Namespace
Drupal\social_postFile
modules/social_features/social_post/src/PostTypeListBuilder.phpView source
<?php
namespace Drupal\social_post;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;
/**
* Provides a listing of Post type entities.
*/
class PostTypeListBuilder extends ConfigEntityListBuilder {
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['label'] = $this
->t('Post type');
$header['id'] = $this
->t('Machine name');
return $header + parent::buildHeader();
}
/**
* {@inheritdoc}
*/
public function buildRow(EntityInterface $entity) {
$row['label'] = $entity
->label();
$row['id'] = $entity
->id();
// You probably want a few more properties here...
return $row + parent::buildRow($entity);
}
}
Classes
Name | Description |
---|---|
PostTypeListBuilder | Provides a listing of Post type entities. |