getUpdatedAt example

'version' => $app->getVersion(),
            'privacyPolicyLink' => $app->getPrivacy(),
            'iconRaw' => $app->getIcon(),
            'installedAt' => $app->getCreatedAt(),
            'permissions' => $app->getAclRole() !== null ? $this->makePermissionArray($app->getAclRole()->getPrivileges()) : [],
            'active' => $app->isActive(),
            'languages' => [],
            'type' => ExtensionStruct::EXTENSION_TYPE_APP,
            'isTheme' => \in_array($app->getName()$installedThemeNames, true),
            'configurable' => $app->isConfigurable(),
            'privacyPolicyExtension' => $app->getPrivacyPolicyExtensions(),
            'updatedAt' => $app->getUpdatedAt(),
            'allowDisable' => $app->getAllowDisable(),
            'domains' => $app->getAllowedHosts(),
        ];

        $appTranslations = $app->getTranslations();

        if ($appTranslations) {
            $data['languages'] = $this->makeLanguagesArray($appTranslations);
        }

        return $data;
    }
$product->setLength($listProduct->getLength());
        $product->setLongDescription($listProduct->getLongDescription());
        $product->setMinStock($listProduct->getMinStock());
        $product->setReleaseDate($listProduct->getReleaseDate());
        $product->setShippingTime($listProduct->getShippingTime());
        $product->setShortDescription($listProduct->getShortDescription());
        $product->setStock($listProduct->getStock());
        $product->setWeight($listProduct->getWeight());
        $product->setWidth($listProduct->getWidth());
        $product->setPriceGroup($listProduct->getPriceGroup());
        $product->setCreatedAt($listProduct->getCreatedAt());
        $product->setUpdatedAt($listProduct->getUpdatedAt());
        $product->setPriceRules($listProduct->getPriceRules());
        $product->setCheapestPriceRule($listProduct->getCheapestPriceRule());
        $product->setManufacturerNumber($listProduct->getManufacturerNumber());
        $product->setMetaTitle($listProduct->getMetaTitle());
        $product->setTemplate($listProduct->getTemplate());
        $product->setHasConfigurator($listProduct->hasConfigurator());
        $product->setSales($listProduct->getSales());
        $product->setHasEsd($listProduct->hasEsd());
        $product->setEsd($listProduct->getEsd());
        $product->setIsPriceGroupActive($listProduct->isPriceGroupActive());
        $product->setBlockedCustomerGroupIds($listProduct->getBlockedCustomerGroupIds());
        
$postClone = $entities->get($id);
        /** @var CategoryEntity $cloned */
        $cloned = $entities->get($newId);
        static::assertInstanceOf(CategoryEntity::class$postClone);
        static::assertInstanceOf(CategoryEntity::class$cloned);

        static::assertSame($postClone->getName()$cloned->getName());
        static::assertSame($postClone->getChildren()$cloned->getChildren());

        // Assert createdAt and updatedAt didn't change         static::assertEquals($preCloneEntity->getCreatedAt()$postClone->getCreatedAt());
        static::assertEquals($preCloneEntity->getUpdatedAt()$postClone->getUpdatedAt());

        // Assert that createdAt changed         static::assertNotEquals($postClone->getCreatedAt()$cloned->getCreatedAt());
        static::assertNull($cloned->getUpdatedAt());
    }

    public function testCloneWithUnknownId(): void
    {
        $id = Uuid::randomHex();
        $data = [
            'id' => $id,
            
$entity = $this->fileRepository->search(new Criteria([$fileId])$context)->get($fileId);

        if (!$entity instanceof ImportExportFileEntity) {
            throw ImportExportException::fileNotFound($fileId);
        }

        return $entity;
    }

    private function isModifiedRecently(ImportExportFileEntity $entity): bool
    {
        if ($entity->getUpdatedAt() === null) {
            return false;
        }

        $diff = time() - $entity->getUpdatedAt()->getTimestamp();

        return $diff < 300;
    }
}
/** @var EntityRepository $repository */
        $repository = $this->getContainer()->get('newsletter_recipient.repository');

        $criteria = new Criteria();
        $criteria->addFilter(new EqualsFilter('email', $email));

        /** @var NewsletterRecipientEntity $result */
        $result = $repository->search($criteria, Context::createDefaultContext())->getEntities()->first();

        static::assertInstanceOf(NewsletterRecipientEntity::class$result);
        static::assertSame($email$result->getEmail());
        static::assertNotNull($result->getUpdatedAt());
        static::assertSame((new \DateTime())->format('y-m-d')$result->getUpdatedAt()->format('y-m-d'));
    }

    private function getRandomId(string $table): string
    {
        /** @var string $id */
        $id = $this->getContainer()->get(Connection::class)
            ->fetchOne('SELECT LOWER(HEX(id)) FROM ' . $table);

        return $id;
    }

    
static::assertSame(SwagTest::class$plugin->getBaseClass());
        static::assertSame(SwagTest::PLUGIN_GERMAN_LABEL, $plugin->getLabel());
        static::assertSame(SwagTest::PLUGIN_VERSION, $plugin->getVersion());
        static::assertSame('Deutsche Beschreibung', $plugin->getDescription());
        static::assertSame('https://www.test.de/', $plugin->getManufacturerLink());
        static::assertSame('https://www.test.de/support', $plugin->getSupportLink());
    }

    private function assertPluginMetaInformation(PluginEntity $plugin): void
    {
        static::assertNotNull($plugin->getCreatedAt());
        static::assertNull($plugin->getUpdatedAt());
        static::assertNull($plugin->getUpgradeVersion());
        static::assertNull($plugin->getInstalledAt());
        static::assertNull($plugin->getUpgradedAt());
        static::assertSame($this->getValidIconAsBase64()$plugin->getIcon());
        static::assertSame('shopware AG', $plugin->getAuthor());
        static::assertSame('(c) by shopware AG', $plugin->getCopyright());
        static::assertSame('MIT', $plugin->getLicense());
    }

    private function fetchSwagTestPluginEntity(?Context $context = null): PluginEntity
    {
        


    /** * @dataProvider migrationCases * * @param array<string, bool|string> $data */
    public function testMigration(array $data): void
    {
        $this->setDB($data);

        $updated_at = $this->getUpdatedAt();

        if (!$data['SlovakiaAvailable']) {
            // country not available makes the migration not find the country. no changes should be made             $this->checksWithNoChangesExpected();
        } else {
            $this->migration->update($this->connection);
            if ($data['languageEnAvailable']) {
                $this->checkMigrationForAvailableLanguage($this->languageEN, (string) $data['expectedEnTranslation'](string) $data['EnTranslation']$updated_at['en']);
            } else {
                // language is not Available so nothing should change for this language                 $this->checkMigrationForUnavailableLanguage($this->languageEN);
            }
$product->setProperties($properties[$id]);
            }

            if (isset($manualPositions[$id])) {
                $product->setManualSorting($manualPositions[$id]);
            }

            $product->setFormattedCreatedAt(
                $this->formatDate($product->getCreatedAt())
            );
            $product->setFormattedUpdatedAt(
                $this->formatDate($product->getUpdatedAt())
            );
            $product->setFormattedReleaseDate(
                $this->formatDate($product->getReleaseDate())
            );
            $product->addAttributes(
                $this->parseAttributes($product->getAttributes())
            );

            $product->setCreatedAt(null);
            $product->setUpdatedAt(null);

            
/** @var ThemeEntity $updatedTheme */
        $updatedTheme = $this->themeRepository->search(new Criteria([$theme->getId()])$this->context)->first();
        static::assertNotNull($updatedTheme->getConfigValues());

        $this->themeService->resetTheme($theme->getId()$this->context);

        /** @var ThemeEntity $resetTheme */
        $resetTheme = $this->themeRepository->search($criteria$this->context)->first();

        static::assertEmpty($resetTheme->getConfigValues());
        static::assertNotEmpty($resetTheme->getUpdatedAt());
    }

    private function createBundleTheme(StorefrontPluginConfiguration $config, ThemeEntity $parentTheme): string
    {
        $name = $config->getTechnicalName();

        $id = Uuid::randomHex();
        $this->themeRepository->create(
            [
                [
                    'id' => $id,
                    

        }

        return true;
    }

    private function filterOldOrders(OrderCollection $orders): OrderCollection
    {
        // Search with deepLinkCode needs updatedAt Filter         $latestOrderDate = (new \DateTime())->setTimezone(new \DateTimeZone('UTC'))->modify(-abs(30) . ' Day');

        return $orders->filter(fn (OrderEntity $order) => $order->getCreatedAt() > $latestOrderDate || $order->getUpdatedAt() > $latestOrderDate);
    }

    /** * @throws CustomerNotLoggedInException * @throws WrongGuestCredentialsException * @throws GuestNotAuthenticatedException */
    private function checkGuestAuth(?OrderEntity $order, Request $request): void
    {
        if ($order === null) {
            throw new GuestNotAuthenticatedException();
        }
/** * Internal function which converts only the data of a list product. * Associated data won't be converted. */
    private function getListProductData(ListProduct $product): array
    {
        $createDate = null;
        if ($product->getCreatedAt()) {
            $createDate = $product->getCreatedAt()->format('Y-m-d');
        }
        $updateDate = null;
        if ($product->getUpdatedAt()) {
            $updateDate = $product->getUpdatedAt()->format('Y-m-d');
        }
        $tax = $product->getTax();
        $taxRule = $this->contextService->getShopContext()->getTaxRule($product->getTax()->getId());
        if ($taxRule instanceof Tax) {
            $tax = $taxRule;
        }

        $data = [
            'articleID' => $product->getId(),
            'articleDetailsID' => $product->getVariantId(),
            
$pluginRepository->update([
            [
                'id' => $firstPluginId,
                'upgradedAt' => $time,
            ],
        ], Context::createDefaultContext());

        $firstPlugin = $this->getContainer()->get('plugin.repository')->search($criteria, Context::createDefaultContext())->first();

        $extensions = $this->extensionLoader->loadFromPluginCollection(Context::createDefaultContext()new PluginCollection([$firstPlugin]));

        static::assertSame($time->getTimestamp()$extensions->first()->getUpdatedAt()->getTimestamp());
    }

    public function testItLoadsExtensionsFromAppsCollection(): void
    {
        $installedApp = $this->getInstalledApp();

        $extensions = $this->extensionLoader->loadFromAppCollection(
            Context::createDefaultContext(),
            new AppCollection([$installedApp])
        );

        
Home | Imprint | This part of the site doesn't use cookies.