EntityDisplayModeInterface.php

Same filename and directory in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityDisplayModeInterface.php
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityDisplayModeInterface.php
  3. 10 core/lib/Drupal/Core/Entity/EntityDisplayModeInterface.php

Namespace

Drupal\Core\Entity

File

core/lib/Drupal/Core/Entity/EntityDisplayModeInterface.php

View source
<?php

namespace Drupal\Core\Entity;

use Drupal\Core\Config\Entity\ConfigEntityInterface;

/**
 * Provides an interface for entity types that hold form and view mode settings.
 */
interface EntityDisplayModeInterface extends ConfigEntityInterface {
    
    /**
     * Gets the entity type this display mode is used for.
     *
     * @return string
     *   The entity type name.
     */
    public function getTargetType();
    
    /**
     * Set the entity type this display mode is used for.
     *
     * @param string $target_entity_type
     *   The target entity type for this display mode.
     *
     * @return $this
     */
    public function setTargetType($target_entity_type);
    
    /**
     * Gets the display mode description.
     *
     * @return string
     *   The display mode description.
     */
    public function getDescription() : string;

}

Interfaces

Title Deprecated Summary
EntityDisplayModeInterface Provides an interface for entity types that hold form and view mode settings.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.