Site example

$site = $this->getSiteRepository()->find($siteId);
                if (!$site instanceof Site) {
                    throw new ModelNotFoundException(Site::class$siteId);
                }
            } else {
                if (!$this->_isAllowed('createSite', 'site')) {
                    $this->View()->assign(['success' => false, 'message' => 'Permission denied.']);

                    return;
                }

                $site = new Site();
            }

            $site->fromArray($params);
            $site->setChanged();

            $this->getManager()->persist($site);

            $this->getManager()->flush();

            $data = $this->getSiteRepository()
                ->getSiteQuery($site->getId())
                
Home | Imprint | This part of the site doesn't use cookies.