Skip to main content

Media

DrevOps\BehatSteps\Steps\Drupal\MediaTrait - Source, Steps

Manage Drupal media entities with type-specific field handling.

public function mediaCreate(EntityStubInterface $stub): EntityStubInterface

Create a single media item

public function mediaCreateEntity(EntityStubInterface $stub): EntityStubInterface

Create media entity

public function mediaDelete(string $media_type, array $conditions): void

Delete the media of a type that match conditions

public function mediaLoadMultiple(string $media_type, array $conditions = []): array

Load multiple media entities with specified type and conditions

public function mediaVisitActionPageWithName(string $media_type, string $name, string $rel = 'canonical'): void

Visit a page of the media with a specified name