Album example

AbstractQuery::HYDRATE_OBJECT
            );

            if (!$album instanceof Album) {
                $this->View()->assign(['success' => false, 'message' => 'Invalid album id passed']);

                return;
            }
        }

        if (!$album instanceof Album) {
            $album = new Album();
            $this->getManager()->persist($album);
        }

        try {
            $data = $this->resolveAlbumData($data$album);
            $album->fromArray($data);

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

            $this->View()->assign(['success' => true, 'data' => ['id' => $album->getId()]]);
        }
Home | Imprint | This part of the site doesn't use cookies.