Chris@0: getDefinitions() as $entity_type => $info) { Chris@0: if ($entity_manager->hasHandler($entity_type, 'view_builder')) { Chris@0: $entity_manager->getViewBuilder($entity_type)->resetCache(); Chris@0: } Chris@0: } Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns the entity bundle info. Chris@0: * Chris@0: * @param string|null $entity_type Chris@0: * The entity type whose bundle info should be returned, or NULL for all Chris@0: * bundles info. Defaults to NULL. Chris@0: * Chris@0: * @return array Chris@0: * The bundle info for a specific entity type, or all entity types. Chris@0: * Chris@0: * @deprecated in Drupal 8.x-dev and will be removed before Drupal 9.0.0. Use Chris@0: * \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo() for a Chris@0: * single bundle, or Chris@0: * \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getAllBundleInfo() for Chris@0: * all bundles. Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo() Chris@0: * @see \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getAllBundleInfo() Chris@0: */ Chris@0: function entity_get_bundles($entity_type = NULL) { Chris@0: if (isset($entity_type)) { Chris@0: return \Drupal::entityManager()->getBundleInfo($entity_type); Chris@0: } Chris@0: else { Chris@0: return \Drupal::entityManager()->getAllBundleInfo(); Chris@0: } Chris@0: } Chris@0: Chris@0: /** Chris@0: * Loads an entity from the database. Chris@0: * Chris@0: * @param string $entity_type Chris@0: * The entity type to load, e.g. node or user. Chris@0: * @param mixed $id Chris@0: * The id of the entity to load. Chris@0: * @param bool $reset Chris@0: * Whether to reset the internal cache for the requested entity type. Chris@0: * Chris@0: * @return \Drupal\Core\Entity\EntityInterface|null Chris@0: * The entity object, or NULL if there is no entity with the given ID. Chris@0: * Chris@18: * @deprecated in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the Chris@18: * entity type storage's load() method. Chris@0: * Chris@18: * @see https://www.drupal.org/node/2266845 Chris@0: */ Chris@0: function entity_load($entity_type, $id, $reset = FALSE) { Chris@18: @trigger_error('entity_load() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the entity type storage\'s load() method. See https://www.drupal.org/node/2266845', E_USER_DEPRECATED); Chris@0: $controller = \Drupal::entityManager()->getStorage($entity_type); Chris@0: if ($reset) { Chris@0: $controller->resetCache([$id]); Chris@0: } Chris@0: return $controller->load($id); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Loads an entity from the database. Chris@0: * Chris@0: * @param string $entity_type Chris@0: * The entity type to load, e.g. node or user. Chris@0: * @param int $revision_id Chris@0: * The id of the entity to load. Chris@0: * Chris@0: * @return \Drupal\Core\Entity\EntityInterface|null Chris@0: * The entity object, or NULL if there is no entity with the given revision Chris@0: * id. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use Chris@0: * the entity storage's loadRevision() method to load a specific entity Chris@0: * revision: Chris@17: * @code Chris@17: * \Drupal::entityTypeManager() Chris@17: * ->getStorage($entity_type) Chris@17: * ->loadRevision($revision_id); Chris@17: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::loadRevision() Chris@0: * @see \Drupal\Core\Entity\Sql\SqlContentEntityStorage Chris@0: */ Chris@0: function entity_revision_load($entity_type, $revision_id) { Chris@0: return \Drupal::entityManager() Chris@0: ->getStorage($entity_type) Chris@0: ->loadRevision($revision_id); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Deletes an entity revision. Chris@0: * Chris@0: * @param string $entity_type Chris@0: * The entity type to load, e.g. node or user. Chris@0: * @param $revision_id Chris@0: * The revision ID to delete. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use Chris@0: * the entity storage's deleteRevision() method to delete a specific entity Chris@0: * revision: Chris@17: * @code Chris@17: * \Drupal::entityTypeManager() Chris@17: * ->getStorage($entity_type) Chris@17: * ->deleteRevision($revision_id); Chris@17: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::deleteRevision() Chris@0: */ Chris@0: function entity_revision_delete($entity_type, $revision_id) { Chris@0: \Drupal::entityManager() Chris@0: ->getStorage($entity_type) Chris@0: ->deleteRevision($revision_id); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Loads multiple entities from the database. Chris@0: * Chris@0: * This function should be used whenever you need to load more than one entity Chris@0: * from the database. The entities are loaded into memory and will not require Chris@0: * database access if loaded again during the same page request. Chris@0: * Chris@0: * The actual loading is done through a class that has to implement the Chris@0: * \Drupal\Core\Entity\EntityStorageInterface interface. By default, Chris@0: * \Drupal\Core\Entity\Sql\SqlContentEntityStorage is used for content entities Chris@0: * and Drupal\Core\Config\Entity\ConfigEntityStorage for config entities. Entity Chris@0: * types can specify that a different class should be used by setting the Chris@0: * "handlers['storage']" key in the entity plugin annotation. These classes Chris@0: * can either implement the \Drupal\Core\Entity\EntityStorageInterface Chris@0: * interface, or, most commonly, extend the Chris@0: * \Drupal\Core\Entity\Sql\SqlContentEntityStorage class. See Chris@0: * \Drupal\node\Entity\Node and \Drupal\node\NodeStorage for an example. Chris@0: * Chris@0: * @param string $entity_type Chris@0: * The entity type to load, e.g. node or user. Chris@0: * @param array $ids Chris@0: * (optional) An array of entity IDs. If omitted, all entities are loaded. Chris@0: * @param bool $reset Chris@0: * Whether to reset the internal cache for the requested entity type. Chris@0: * Chris@0: * @return array Chris@0: * An array of entity objects indexed by their IDs. Chris@0: * Chris@18: * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the Chris@18: * entity type storage's loadMultiple() method. Chris@0: * Chris@18: * @see https://www.drupal.org/node/2266845 Chris@0: */ Chris@0: function entity_load_multiple($entity_type, array $ids = NULL, $reset = FALSE) { Chris@18: @trigger_error('entity_load_multiple() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the entity type storage\'s loadMultiple() method. See https://www.drupal.org/node/2266845', E_USER_DEPRECATED); Chris@0: $controller = \Drupal::entityManager()->getStorage($entity_type); Chris@0: if ($reset) { Chris@0: $controller->resetCache($ids); Chris@0: } Chris@0: return $controller->loadMultiple($ids); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Load entities by their property values. Chris@0: * Chris@0: * @param string $entity_type Chris@0: * The entity type to load, e.g. node or user. Chris@0: * @param array $values Chris@0: * An associative array where the keys are the property names and the Chris@0: * values are the values those properties must have. Chris@0: * Chris@0: * @return array Chris@0: * An array of entity objects indexed by their IDs. Returns an empty array if Chris@0: * no matching entities are found. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use Chris@0: * the entity storage's loadByProperties() method to load an entity by their Chris@0: * property values: Chris@17: * @code Chris@17: * \Drupal::entityTypeManager() Chris@17: * ->getStorage($entity_type) Chris@17: * ->loadByProperties($values); Chris@17: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::loadByProperties() Chris@0: */ Chris@0: function entity_load_multiple_by_properties($entity_type, array $values) { Chris@0: return \Drupal::entityManager() Chris@0: ->getStorage($entity_type) Chris@0: ->loadByProperties($values); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Loads the unchanged, i.e. not modified, entity from the database. Chris@0: * Chris@0: * Unlike entity_load() this function ensures the entity is directly loaded from Chris@0: * the database, thus bypassing any static cache. In particular, this function Chris@0: * is useful to determine changes by comparing the entity being saved to the Chris@0: * stored entity. Chris@0: * Chris@0: * @param $entity_type Chris@0: * The entity type to load, e.g. node or user. Chris@0: * @param $id Chris@0: * The ID of the entity to load. Chris@0: * Chris@0: * @return \Drupal\Core\Entity\EntityInterface|null Chris@0: * The unchanged entity, or FALSE if the entity cannot be loaded. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use Chris@0: * the entity storage's loadUnchanged() method to load an unchanged entity: Chris@17: * @code Chris@17: * \Drupal::entityTypeManager()->getStorage($entity_type)->loadUnchanged($id); Chris@17: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::loadUnchanged() Chris@0: */ Chris@0: function entity_load_unchanged($entity_type, $id) { Chris@0: return \Drupal::entityManager() Chris@0: ->getStorage($entity_type) Chris@0: ->loadUnchanged($id); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Deletes multiple entities permanently. Chris@0: * Chris@0: * @param string $entity_type Chris@0: * The type of the entity. Chris@0: * @param array $ids Chris@0: * An array of entity IDs of the entities to delete. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use Chris@0: * the entity storage's delete() method to delete multiple entities: Chris@17: * @code Chris@17: * $storage_handler = \Drupal::entityTypeManager()->getStorage($entity_type); Chris@17: * $entities = $storage_handler->loadMultiple($ids); Chris@17: * $storage_handler->delete($entities); Chris@17: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::loadMultiple() Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::delete() Chris@0: */ Chris@0: function entity_delete_multiple($entity_type, array $ids) { Chris@0: $controller = \Drupal::entityManager()->getStorage($entity_type); Chris@0: $entities = $controller->loadMultiple($ids); Chris@0: $controller->delete($entities); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Constructs a new entity object, without permanently saving it. Chris@0: * Chris@0: * @param string $entity_type Chris@0: * The type of the entity. Chris@0: * @param array $values Chris@0: * (optional) An array of values to set, keyed by property name. If the Chris@0: * entity type has bundles, the bundle key has to be specified. Chris@0: * Chris@0: * @return \Drupal\Core\Entity\EntityInterface Chris@0: * A new entity object. Chris@0: * Chris@0: * @deprecated in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use Chris@0: * The method overriding Entity::create() for the entity type, e.g. Chris@0: * \Drupal\node\Entity\Node::create() if the entity type is known. If the Chris@0: * entity type is variable, use the entity storage's create() method to Chris@0: * construct a new entity: Chris@17: * @code Chris@17: * \Drupal::entityTypeManager()->getStorage($entity_type)->create($values); Chris@17: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::create() Chris@0: */ Chris@0: function entity_create($entity_type, array $values = []) { Chris@0: return \Drupal::entityManager() Chris@0: ->getStorage($entity_type) Chris@0: ->create($values); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns the label of an entity. Chris@0: * Chris@0: * @param \Drupal\Core\Entity\EntityInterface $entity Chris@0: * The entity for which to generate the label. Chris@0: * @param $langcode Chris@0: * (optional) The language code of the language that should be used for Chris@0: * getting the label. If set to NULL, the entity's default language is Chris@0: * used. Chris@0: * Chris@0: * @return string|null Chris@0: * The label of the entity, or NULL if there is no label defined. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use Chris@0: * the entity's label() method to get the label of the entity: Chris@17: * @code Chris@17: * $entity->label($langcode); Chris@17: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityInterface::label() Chris@0: */ Chris@0: function entity_page_label(EntityInterface $entity, $langcode = NULL) { Chris@0: return $entity->label($langcode); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns the render array for an entity. Chris@0: * Chris@0: * @param \Drupal\Core\Entity\EntityInterface $entity Chris@0: * The entity to be rendered. Chris@0: * @param string $view_mode Chris@0: * The view mode that should be used to display the entity. Chris@0: * @param string $langcode Chris@0: * (optional) For which language the entity should be rendered, defaults to Chris@0: * the current content language. Chris@0: * @param bool $reset Chris@0: * (optional) Whether to reset the render cache for the requested entity. Chris@0: * Defaults to FALSE. Chris@0: * Chris@0: * @return array Chris@0: * A render array for the entity. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Chris@0: * Use the entity view builder's view() method for creating a render array: Chris@17: * @code Chris@17: * $view_builder = \Drupal::entityTypeManager() Chris@17: * ->getViewBuilder($entity->getEntityTypeId()); Chris@17: * return $view_builder->view($entity, $view_mode, $langcode); Chris@17: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityTypeManagerInterface::getViewBuilder() Chris@0: * @see \Drupal\Core\Entity\EntityViewBuilderInterface::view() Chris@0: */ Chris@0: function entity_view(EntityInterface $entity, $view_mode, $langcode = NULL, $reset = FALSE) { Chris@0: $render_controller = \Drupal::entityManager()->getViewBuilder($entity->getEntityTypeId()); Chris@0: if ($reset) { Chris@0: $render_controller->resetCache([$entity]); Chris@0: } Chris@0: return $render_controller->view($entity, $view_mode, $langcode); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns the render array for the provided entities. Chris@0: * Chris@0: * @param \Drupal\Core\Entity\EntityInterface[] $entities Chris@0: * The entities to be rendered, must be of the same type. Chris@0: * @param string $view_mode Chris@0: * The view mode that should be used to display the entity. Chris@0: * @param string $langcode Chris@0: * (optional) For which language the entity should be rendered, defaults to Chris@0: * the current content language. Chris@0: * @param bool $reset Chris@0: * (optional) Whether to reset the render cache for the requested entities. Chris@0: * Defaults to FALSE. Chris@0: * Chris@0: * @return array Chris@0: * A render array for the entities, indexed by the same keys as the Chris@0: * entities array passed in $entities. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Chris@0: * Use the entity view builder's viewMultiple() method for creating a render Chris@0: * array for the provided entities: Chris@17: * @code Chris@17: * $view_builder = \Drupal::entityTypeManager() Chris@17: * ->getViewBuilder($entity->getEntityTypeId()); Chris@17: * return $view_builder->viewMultiple($entities, $view_mode, $langcode); Chris@17: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityTypeManagerInterface::getViewBuilder() Chris@0: * @see \Drupal\Core\Entity\EntityViewBuilderInterface::viewMultiple() Chris@0: */ Chris@0: function entity_view_multiple(array $entities, $view_mode, $langcode = NULL, $reset = FALSE) { Chris@0: $render_controller = \Drupal::entityManager()->getViewBuilder(reset($entities)->getEntityTypeId()); Chris@0: if ($reset) { Chris@0: $render_controller->resetCache($entities); Chris@0: } Chris@0: return $render_controller->viewMultiple($entities, $view_mode, $langcode); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns the entity view display associated with a bundle and view mode. Chris@0: * Chris@0: * Use this function when assigning suggested display options for a component Chris@0: * in a given view mode. Note that they will only be actually used at render Chris@0: * time if the view mode itself is configured to use dedicated display settings Chris@0: * for the bundle; if not, the 'default' display is used instead. Chris@0: * Chris@0: * The function reads the entity view display from the current configuration, or Chris@0: * returns a ready-to-use empty one if configuration entry exists yet for this Chris@0: * bundle and view mode. This streamlines manipulation of display objects by Chris@0: * always returning a consistent object that reflects the current state of the Chris@0: * configuration. Chris@0: * Chris@0: * Example usage: Chris@0: * - Set the 'body' field to be displayed and the 'field_image' field to be Chris@0: * hidden on article nodes in the 'default' display. Chris@0: * @code Chris@0: * entity_get_display('node', 'article', 'default') Chris@0: * ->setComponent('body', array( Chris@0: * 'type' => 'text_summary_or_trimmed', Chris@0: * 'settings' => array('trim_length' => '200') Chris@0: * 'weight' => 1, Chris@0: * )) Chris@0: * ->removeComponent('field_image') Chris@0: * ->save(); Chris@0: * @endcode Chris@0: * Chris@0: * @param string $entity_type Chris@0: * The entity type. Chris@0: * @param string $bundle Chris@0: * The bundle. Chris@0: * @param string $view_mode Chris@0: * The view mode, or 'default' to retrieve the 'default' display object for Chris@0: * this bundle. Chris@0: * Chris@0: * @return \Drupal\Core\Entity\Display\EntityViewDisplayInterface Chris@0: * The entity view display associated with the view mode. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Chris@0: * If the display is available in configuration use: Chris@0: * @code Chris@0: * \Drupal::entityTypeManager() Chris@0: * ->getStorage('entity_view_display') Chris@0: * ->load($entity_type . '.' . $bundle . '.' . $view_mode); Chris@0: * @endcode Chris@0: * When the display is not available in configuration, you can create a new Chris@0: * EntityViewDisplay object using: Chris@0: * @code Chris@0: * $values = array( Chris@0: * 'targetEntityType' => $entity_type, Chris@0: * 'bundle' => $bundle, Chris@0: * 'mode' => $view_mode, Chris@0: * 'status' => TRUE, Chris@0: * ); Chris@0: * \Drupal::entityTypeManager() Chris@0: * ->getStorage('entity_view_display') Chris@0: * ->create($values); Chris@0: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::create() Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::load() Chris@0: */ Chris@0: function entity_get_display($entity_type, $bundle, $view_mode) { Chris@0: // Try loading the display from configuration. Chris@0: $display = EntityViewDisplay::load($entity_type . '.' . $bundle . '.' . $view_mode); Chris@0: Chris@0: // If not found, create a fresh display object. We do not preemptively create Chris@0: // new entity_view_display configuration entries for each existing entity type Chris@0: // and bundle whenever a new view mode becomes available. Instead, Chris@0: // configuration entries are only created when a display object is explicitly Chris@0: // configured and saved. Chris@0: if (!$display) { Chris@0: $display = EntityViewDisplay::create([ Chris@0: 'targetEntityType' => $entity_type, Chris@0: 'bundle' => $bundle, Chris@0: 'mode' => $view_mode, Chris@0: 'status' => TRUE, Chris@0: ]); Chris@0: } Chris@0: Chris@0: return $display; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns the entity form display associated with a bundle and form mode. Chris@0: * Chris@0: * The function reads the entity form display object from the current Chris@0: * configuration, or returns a ready-to-use empty one if no configuration entry Chris@0: * exists yet for this bundle and form mode. This streamlines manipulation of Chris@0: * entity form displays by always returning a consistent object that reflects Chris@0: * the current state of the configuration. Chris@0: * Chris@0: * Example usage: Chris@0: * - Set the 'body' field to be displayed with the 'text_textarea_with_summary' Chris@0: * widget and the 'field_image' field to be hidden on article nodes in the Chris@0: * 'default' form mode. Chris@0: * @code Chris@0: * entity_get_form_display('node', 'article', 'default') Chris@0: * ->setComponent('body', array( Chris@0: * 'type' => 'text_textarea_with_summary', Chris@0: * 'weight' => 1, Chris@0: * )) Chris@0: * ->setComponent('field_image', array( Chris@0: * 'region' => 'hidden', Chris@0: * )) Chris@0: * ->save(); Chris@0: * @endcode Chris@0: * Chris@0: * @param string $entity_type Chris@0: * The entity type. Chris@0: * @param string $bundle Chris@0: * The bundle. Chris@0: * @param string $form_mode Chris@0: * The form mode. Chris@0: * Chris@0: * @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface Chris@0: * The entity form display associated with the given form mode. Chris@0: * Chris@0: * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Chris@0: * If the entity form display is available in configuration use: Chris@0: * @code Chris@0: * \Drupal::entityTypeManager() Chris@0: * ->getStorage('entity_form_display') Chris@0: * ->load($entity_type . '.' . $bundle . '.' . $form_mode); Chris@0: * @endcode Chris@0: * When the entity form display is not available in configuration, you can Chris@0: * create a new EntityFormDisplay object using: Chris@0: * @code Chris@0: * $values = array( Chris@0: * 'targetEntityType' => $entity_type, Chris@0: * 'bundle' => $bundle, Chris@0: * 'mode' => $form_mode, Chris@0: * 'status' => TRUE, Chris@0: * ); Chris@0: * \Drupal::entityTypeManager() Chris@0: * ->getStorage('entity_form_display') Chris@0: * ->create($values); Chris@0: * @endcode Chris@0: * Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::create() Chris@0: * @see \Drupal\Core\Entity\EntityStorageInterface::load() Chris@0: */ Chris@0: function entity_get_form_display($entity_type, $bundle, $form_mode) { Chris@0: // Try loading the entity from configuration. Chris@0: $entity_form_display = EntityFormDisplay::load($entity_type . '.' . $bundle . '.' . $form_mode); Chris@0: Chris@0: // If not found, create a fresh entity object. We do not preemptively create Chris@0: // new entity form display configuration entries for each existing entity type Chris@0: // and bundle whenever a new form mode becomes available. Instead, Chris@0: // configuration entries are only created when an entity form display is Chris@0: // explicitly configured and saved. Chris@0: if (!$entity_form_display) { Chris@0: $entity_form_display = EntityFormDisplay::create([ Chris@0: 'targetEntityType' => $entity_type, Chris@0: 'bundle' => $bundle, Chris@0: 'mode' => $form_mode, Chris@0: 'status' => TRUE, Chris@0: ]); Chris@0: } Chris@0: Chris@0: return $entity_form_display; Chris@0: }