You are here

ProfileViewBuilder.php in Profile 2 8

Namespace

Drupal\profile

File

src/ProfileViewBuilder.php
View source
<?php

/**
 * @file
 * Contains \Drupal\profile\ProfileViewBuilder.
 */
namespace Drupal\profile;

use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityViewBuilder;

/**
 * Render controller for profile entities.
 */
class ProfileViewBuilder extends EntityViewBuilder {

  /**
   * {@inheritdoc}
   */
  protected function getBuildDefaults(EntityInterface $entity, $view_mode, $langcode) {
    $defaults = parent::getBuildDefaults($entity, $view_mode, $langcode);
    $defaults['#theme'] = 'profile';
    return $defaults;
  }

}

Classes

Namesort descending Description
ProfileViewBuilder Render controller for profile entities.