getChanged example

'tpl3path' => $site->getTpl3Path(),
            'description' => $site->getDescription(),
            'pageTitle' => $site->getPageTitle(),
            'metaKeywords' => $site->getMetaKeywords(),
            'metaDescription' => $site->getMetaDescription(),
            'html' => $site->getHtml(),
            'grouping' => $site->getGrouping(),
            'position' => $site->getPosition(),
            'link' => $site->getLink(),
            'target' => $site->getTarget(),
            'shopIds' => $site->getShopIds(),
            'changed' => $site->getChanged(),
            'parentId' => $site->getParentId(),
            'leaf' => true,
        ];

        // If the site has children, append them         if ($site->getChildren()->count() > 0) {
            $children = [];
            foreach ($site->getChildren() as $child) {
                $children[] = $this->getSiteNode($idPrefix . $site->getId() . '_', $child);
            }
            $node['nodes'] = $children;
            
return;
            }

            /** @var Customer $customer */
            $customer = $this->getRepository()->find((int) $id);
            /** @var PaymentData $paymentData */
            $paymentData = $this->getManager()->getRepository(PaymentData::class)->findOneBy(
                ['customer' => $customer, 'paymentMean' => (int) $paymentId]
            );

            if ($customer->getChanged() !== null) {
                // Check whether the customer has been modified in the meantime                 try {
                    $changed = new DateTime($params['changed']);
                } catch (Exception $e) {
                    // If we have a invalid date caused by imports                     $changed = $customer->getChanged();
                }

                if ($changed->getTimestamp() < 0 && $customer->getChanged()->getTimestamp() < 0) {
                    $changed = $customer->getChanged();
                }

                
$productId = (int) $this->Request()->getParam('id');
            $product = $this->getRepository()->find($productId);
            if (!$product instanceof Product) {
                throw new ModelNotFoundException(Product::class$productId);
            }

            // Check whether the product has been modified in the meantime             try {
                $lastChanged = new DateTime($data['changed']);
            } catch (Exception $e) {
                // If we have a invalid date caused by product imports                 $lastChanged = $product->getChanged();
            }

            if ($lastChanged->getTimestamp() < 0 && $product->getChanged()->getTimestamp() < 0) {
                $lastChanged = $product->getChanged();
            }

            $diff = abs($product->getChanged()->getTimestamp() - $lastChanged->getTimestamp());

            // We have timestamp conversion issues on Windows Users             if ($diff > 1) {
                $namespace = $this->get('snippets')->getNamespace('backend/article/controller/main');

                
// Check if the shipping and billing model already exist. If not create a new instance.         if (!$shipping instanceof Shipping) {
            $shipping = new Shipping();
        }

        if (!$billing instanceof Billing) {
            $billing = new Billing();
        }
        // Get all passed order data         $data = $this->Request()->getParams();

        if ($order->getChanged() !== null) {
            try {
                $changed = new DateTime($data['changed']);
            } catch (Exception $e) {
                // If we have an invalid date caused by imports                 $changed = $order->getChanged();
            }

            if ($changed->getTimestamp() < 0 && $order->getChanged()->getTimestamp() < 0) {
                $changed = $order->getChanged();
            }

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