public function ContentFileStorageInterface::writeEntity in Default Content for D8 2.0.x
Writes a normalized entity to the given folder.
Parameters
string $folder: The target folder.
string $encoded: The encoded entity (YAML).
\Drupal\Core\Entity\ContentEntityInterface $entity: The content being written.
string $filename: (optional) The name of the file, defaults to UUID.yml. Must end with .yml.
1 method overrides ContentFileStorageInterface::writeEntity()
- ContentFileStorage::writeEntity in src/
ContentFileStorage.php - Writes a normalized entity to the given folder.
File
- src/
ContentFileStorageInterface.php, line 36
Class
- ContentFileStorageInterface
- Finds, reads and writes default content files.
Namespace
Drupal\default_contentCode
public function writeEntity(string $folder, string $encoded, ContentEntityInterface $entity, string $filename = NULL);