getObjectTranslation example


    public function delete($id$data)
    {
        $this->checkPrivilege('delete');

        if (empty($id)) {
            throw new ParameterMissingException('id');
        }

        $this->checkRequirements($data, false);

        $translation = $this->getObjectTranslation(
            $data['type'],
            $id,
            $data['shopId'],
            AbstractQuery::HYDRATE_OBJECT
        );

        if (!$translation instanceof TranslationModel) {
            throw new NotFoundException(sprintf('No translation found for type %s, shop id %s and foreign key %s', $data['type']$data['shopId']$id));
        }

        $this->getManager()->remove($translation);

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