class TestEntityController

Controller class for the test entity entity types.

Hierarchy

Expanded class hierarchy of TestEntityController

File

drupal/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntityController.php, line 16
Definition of Drupal\field_test\TestEntityController.

Namespace

Drupal\field_test
View source
class TestEntityController extends DatabaseStorageController {

  /**
   * Overrides Drupal\Core\Entity\DatabaseStorageController::preSaveRevision().
   */
  public function preSaveRevision(\stdClass $record, EntityInterface $entity) {

    // Allow for predefined revision ids.
    if (!empty($record->use_provided_revision_id)) {
      $record->ftvid = $record->use_provided_revision_id;
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DatabaseStorageController::$cache protected property Whether this entity type should use the static cache.
DatabaseStorageController::$entityCache protected property Static cache of entities.
DatabaseStorageController::$entityFieldInfo protected property An array of field information, i.e. containing definitions.
DatabaseStorageController::$entityInfo protected property Array of information about the entity.
DatabaseStorageController::$entityType protected property Entity type for this controller instance.
DatabaseStorageController::$hookLoadArguments protected property Additional arguments to pass to hook_TYPE_load().
DatabaseStorageController::$idKey protected property Name of the entity's ID field in the entity database table.
DatabaseStorageController::$revisionKey protected property Name of entity's revision database table field, if it supports revisions.
DatabaseStorageController::$revisionTable protected property The table that stores revisions, if the entity supports revisions.
DatabaseStorageController::$uuidKey protected property Name of entity's UUID database table field, if it supports UUIDs.
DatabaseStorageController::attachLoad protected function Attaches data to entities upon loading. 4
DatabaseStorageController::baseFieldDefinitions public function Defines the base properties of the entity type. 1
DatabaseStorageController::buildPropertyQuery protected function Builds an entity query. 2
DatabaseStorageController::buildQuery protected function Builds the query to load the entity. 4
DatabaseStorageController::cacheGet protected function Gets entities from the static cache.
DatabaseStorageController::cacheSet protected function Stores entities in the static entity cache.
DatabaseStorageController::create public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::create(). Overrides EntityStorageControllerInterface::create 5
DatabaseStorageController::delete public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::delete(). Overrides EntityStorageControllerInterface::delete
DatabaseStorageController::deleteRevision public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::deleteRevision(). Overrides EntityStorageControllerInterface::deleteRevision
DatabaseStorageController::getFieldDefinitions public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::getFieldDefinitions(). Overrides EntityStorageControllerInterface::getFieldDefinitions
DatabaseStorageController::getQueryServiceName public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::getQueryServiceName().
DatabaseStorageController::invokeHook protected function Invokes a hook on behalf of the entity. 2
DatabaseStorageController::load public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::load(). Overrides EntityStorageControllerInterface::load
DatabaseStorageController::loadByProperties public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadByProperties(). Overrides EntityStorageControllerInterface::loadByProperties
DatabaseStorageController::loadRevision public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadRevision(). Overrides EntityStorageControllerInterface::loadRevision
DatabaseStorageController::postDelete protected function Acts on deleted entities before the delete hook is invoked. 6
DatabaseStorageController::postSave protected function Acts on a saved entity before the insert or update hook is invoked. 6
DatabaseStorageController::preDelete protected function Acts on entities before they are deleted. 3
DatabaseStorageController::preSave protected function Acts on an entity before the presave hook is invoked. 4
DatabaseStorageController::resetCache public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::resetCache(). Overrides EntityStorageControllerInterface::resetCache 2
DatabaseStorageController::save public function Implements Drupal\Core\Entity\EntityStorageControllerInterface::save(). Overrides EntityStorageControllerInterface::save 2
DatabaseStorageController::saveRevision protected function Saves an entity revision. 1
DatabaseStorageController::__construct public function Constructs a DatabaseStorageController object. 1
EntityStorageControllerInterface::getQueryServicename public function Gets the name of the service for the query for this entity storage. 1
TestEntityController::preSaveRevision public function Overrides Drupal\Core\Entity\DatabaseStorageController::preSaveRevision(). Overrides DatabaseStorageController::preSaveRevision