class TestEntityForm

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\TestEntityForm
  2. 10 core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\TestEntityForm
  3. 11.x core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php \Drupal\Tests\Core\Entity\TestEntityForm

Provides a test entity form.

Hierarchy

Expanded class hierarchy of TestEntityForm

File

core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php, line 417

Namespace

Drupal\Tests\Core\Entity
View source
class TestEntityForm extends EntityHandlerBase {
    
    /**
     * The entity manager.
     *
     * @var \Drupal\Core\Entity\EntityManagerInterface
     */
    protected $entityManager;
    
    /**
     * The entity type manager.
     *
     * @var \Drupal\Core\Entity\EntityTypeManagerInterface
     */
    protected $entityTypeManager;
    
    /**
     * {@inheritdoc}
     */
    public function getBaseFormId() {
        return 'the_base_form_id';
    }
    
    /**
     * {@inheritdoc}
     */
    public function getFormId() {
        return 'the_form_id';
    }
    
    /**
     * {@inheritdoc}
     */
    public function setEntity(EntityInterface $entity) {
        return $this;
    }
    
    /**
     * {@inheritdoc}
     */
    public function setOperation($operation) {
        return $this;
    }
    
    /**
     * {@inheritdoc}
     */
    public function setEntityManager(EntityManagerInterface $entity_manager) {
        $this->entityManager = $entity_manager;
        return $this;
    }
    
    /**
     * {@inheritdoc}
     */
    public function setEntityTypeManager(EntityTypeManagerInterface $entity_type_manager) {
        $this->entityTypeManager = $entity_type_manager;
        return $this;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overrides
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function 1
DependencySerializationTrait::__wakeup public function 2
EntityHandlerBase::$moduleHandler protected property The module handler to invoke hooks on. 2
EntityHandlerBase::moduleHandler protected function Gets the module handler. 2
EntityHandlerBase::setModuleHandler public function Sets the module handler for this handler.
StringTranslationTrait::$stringTranslation protected property The string translation service.
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
TestEntityForm::$entityManager protected property The entity manager.
TestEntityForm::$entityTypeManager protected property The entity type manager.
TestEntityForm::getBaseFormId public function
TestEntityForm::getFormId public function
TestEntityForm::setEntity public function
TestEntityForm::setEntityManager public function
TestEntityForm::setEntityTypeManager public function
TestEntityForm::setOperation public function

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