public function MappingListBuilder::render in GatherContent 8.4
Same name and namespace in other branches
- 8.5 gathercontent_ui/src/MappingListBuilder.php \Drupal\gathercontent_ui\MappingListBuilder::render()
Builds the entity listing as renderable array for table.html.twig.
@todo Add a link to add a new item to the #empty text.
Overrides EntityListBuilder::render
File
- gathercontent_ui/
src/ MappingListBuilder.php, line 131
Class
- MappingListBuilder
- Provides a listing of GatherContent Mapping entities.
Namespace
Drupal\gathercontent_uiCode
public function render() {
$account_id = DrupalGatherContentClient::getAccountId();
if (!$account_id) {
return parent::render();
}
$projects = $this->client
->getActiveProjects($account_id);
foreach ($projects as $project) {
$remote_templates = $this->client
->templatesGet($project->id);
foreach ($remote_templates as $remote_template) {
$this->templates[$remote_template->id] = $remote_template->updatedAt;
}
}
return parent::render();
}