Commit 72da6e5c authored by Tino Goratsch's avatar Tino Goratsch

removed erroneous references to the SEO module from the social sharing module

parent 26eedb22
Pipeline #18721719 passed with stages
in 10 minutes and 27 seconds
......@@ -19,7 +19,7 @@ class Create extends Core\Controller\AbstractFrontendAction
*/
protected $formTokenHelper;
/**
* @var \ACP3\Modules\ACP3\Seo\Validation\AdminFormValidation
* @var \ACP3\Modules\ACP3\Share\Validation\AdminFormValidation
*/
protected $adminFormValidation;
/**
......
......@@ -19,7 +19,7 @@ class Edit extends Core\Controller\AbstractFrontendAction
*/
protected $formTokenHelper;
/**
* @var \ACP3\Modules\ACP3\Seo\Validation\AdminFormValidation
* @var \ACP3\Modules\ACP3\Share\Validation\AdminFormValidation
*/
protected $adminFormValidation;
/**
......@@ -88,10 +88,10 @@ class Edit extends Core\Controller\AbstractFrontendAction
return $this->actionHelper->handleSaveAction(function () use ($id) {
$formData = $this->request->getPost()->all();
$seo = $this->shareModel->getOneById($id);
$shareInfo = $this->shareModel->getOneById($id);
$this->adminFormValidation
->setUriAlias($seo['uri'])
->setUriAlias($shareInfo['uri'])
->validate($formData);
return $this->shareModel->save($formData, $id);
......
......@@ -28,10 +28,10 @@ class OnLayoutShareRenderFormFieldsListener
private $shareFormFields;
/**
* OnLayoutSeoFormFieldsListener constructor.
* OnLayoutShareRenderFormFieldsListener constructor.
*
* @param ACL $acl
* @param View $view
* @param \ACP3\Core\ACL $acl
* @param \ACP3\Core\View $view
* @param \ACP3\Modules\ACP3\Share\Helpers\ShareFormFields $shareFormFields
*/
public function __construct(
......
......@@ -9,8 +9,8 @@ namespace ACP3\Modules\ACP3\Share\Event\Listener;
use ACP3\Core\ACL;
use ACP3\Core\Model\Event\ModelSaveEvent;
use ACP3\Modules\ACP3\Seo\Installer\Schema;
use ACP3\Modules\ACP3\Share\Helpers\SocialSharingManager;
use ACP3\Modules\ACP3\Share\Installer\Schema;
class SaveSharingInfoOnModelAfterSaveListener
{
......
......@@ -7,18 +7,17 @@
namespace ACP3\Modules\ACP3\Share\Helpers;
use ACP3\Modules\ACP3\Seo\Model\SeoModel;
use ACP3\Modules\ACP3\Share\Model\Repository\ShareRepository;
use ACP3\Modules\ACP3\Share\Model\ShareModel;
class SocialSharingManager
{
/**
* @var SeoModel
* @var \ACP3\Modules\ACP3\Share\Model\ShareModel
*/
private $shareModel;
/**
* @var \ACP3\Modules\ACP3\Seo\Model\Repository\SeoRepository
* @var \ACP3\Modules\ACP3\Share\Model\Repository\ShareRepository
*/
private $shareRepository;
......@@ -48,9 +47,9 @@ class SocialSharingManager
public function deleteSharingInfo(string $path): bool
{
$path .= $this->preparePath($path);
$seo = $this->shareRepository->getOneByUri($path);
$shareInfo = $this->shareRepository->getOneByUri($path);
return !empty($seo) && $this->shareModel->delete($seo['id']) !== false;
return !empty($shareInfo) && $this->shareModel->delete($shareInfo['id']) !== false;
}
/**
......@@ -71,6 +70,8 @@ class SocialSharingManager
* @param array $services
*
* @return bool
*
* @throws \Doctrine\DBAL\DBALException
*/
public function saveSharingInfo(string $path, bool $active = false, array $services = []): bool
{
......
......@@ -9,7 +9,7 @@ namespace ACP3\Modules\ACP3\Share\Model;
use ACP3\Core\Model\AbstractModel;
use ACP3\Core\Model\DataProcessor;
use ACP3\Modules\ACP3\Seo\Installer\Schema;
use ACP3\Modules\ACP3\Share\Installer\Schema;
class ShareModel extends AbstractModel
{
......
......@@ -14,7 +14,7 @@ services:
tags:
- { name: core.eventListener, event: share.layout.add_shariff, method: execute }
seo.event.validate_sharing_info_on_validation_listener:
share.event.validate_sharing_info_on_validation_listener:
class: ACP3\Modules\ACP3\Share\Event\Listener\ValidateSharingInfoOnValidationInfo
arguments:
- '@core.acl'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment