getMailTemplateId example

/** * @extends EntityCollection<MailTemplateTranslationEntity> */
#[Package('sales-channel')] class MailTemplateTranslationCollection extends EntityCollection
{
    /** * @return list<string> */
    public function getMailTemplateIds(): array
    {
        return $this->fmap(fn (MailTemplateTranslationEntity $mailTemplateTranslation) => $mailTemplateTranslation->getMailTemplateId());
    }

    public function filterByMailTemplateId(string $id): self
    {
        return $this->filter(fn (MailTemplateTranslationEntity $mailTemplateTranslation) => $mailTemplateTranslation->getMailTemplateId() === $id);
    }

    /** * @return list<string> */
    public function getLanguageIds(): array
    {
// Rollback migration data and make sure its gone         $this->rollbackMigrationChanges();
        $mailTemplateTypeId = $this->getMailTemplateTypeId();
        static::assertNull($mailTemplateTypeId);

        // Rerun migration and make sure everything is added again         $migration = new Migration1672931011ReviewFormMailTemplate();
        $migration->update($this->connection);

        $mailTemplateTypeId = $this->getMailTemplateTypeId();
        static::assertNotNull($mailTemplateTypeId);
        static::assertNotNull($this->getMailTemplateId($mailTemplateTypeId));
    }

    public function testNewMailTemplatesAreAddedWithoutGermanAndEnglishLanguage(): void
    {
        // Rollback migration data and make sure its gone         $this->rollbackMigrationChanges();
        static::assertNull($this->getMailTemplateTypeId());

        $this->changeDefaultLanguageToDutch();

        // Rerun migration and make sure everything is added again
/** * @extends EntityCollection<MailTemplateMediaEntity> */
#[Package('sales-channel')] class MailTemplateMediaCollection extends EntityCollection
{
    /** * @return list<string> */
    public function getMailTemplateIds(): array
    {
        return $this->fmap(fn (MailTemplateMediaEntity $mailTemplateAttachment) => $mailTemplateAttachment->getMailTemplateId());
    }

    public function filterByMailTemplateId(string $id): self
    {
        return $this->filter(fn (MailTemplateMediaEntity $mailTemplateMedia) => $mailTemplateMedia->getMailTemplateId() === $id);
    }

    /** * @return list<string> */
    public function getMediaIds(): array
    {
Home | Imprint | This part of the site doesn't use cookies.