getFreezeUp example


    public function indexStream(CustomerStreamEntity $stream$offset = null, $limit = null)
    {
        $this->checkPrivilege('save');

        $result = $this->updateFrozenState($stream->getId()$stream->getFreezeUp()$stream->getConditions());
        if ($result) {
            $stream->setStatic($result['static']);
            $stream->setFreezeUp($result['freezeUp']);
        }

        if ($stream->getFreezeUp() !== null || $stream->isStatic()) {
            return;
        }

        $criteria = $this->criteriaFactory->createCriteria($stream->getId());

        
$streamId = (int) $this->Request()->getParam('streamId');
        $total = (int) $this->Request()->getParam('total');

        $snippets = $this->container->get('snippets')->getNamespace('backend/customer/view/main');
        $stream = $this->container->get(ModelManager::class)->find(CustomerStream::class$streamId);
        if (!$stream instanceof CustomerStream) {
            $this->View()->assign('success', false);

            return;
        }

        if ($stream->getFreezeUp()) {
            $this->View()->assign([
                'success' => true,
                'finish' => true,
                'progress' => 1,
                'text' => $snippets->get('stream_refreshed'),
            ]);

            return;
        }

        $iteration = (int) $this->Request()->getParam('iteration', 1);
        
Home | Imprint | This part of the site doesn't use cookies.