Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upgrade plugin ProductReview for ec-cube 4.2 #73

Merged
merged 1 commit into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Controller/Admin/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Controller\Admin;
namespace Plugin\ProductReview42\Controller\Admin;

use Plugin\ProductReview4\Form\Type\Admin\ProductReviewConfigType;
use Plugin\ProductReview4\Repository\ProductReviewConfigRepository;
use Plugin\ProductReview42\Form\Type\Admin\ProductReviewConfigType;
use Plugin\ProductReview42\Repository\ProductReviewConfigRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\Request;
Expand All @@ -25,8 +25,8 @@
class ConfigController extends \Eccube\Controller\AbstractController
{
/**
* @Route("/%eccube_admin_route%/product_review/config", name="product_review4_admin_config")
* @Template("@ProductReview4/admin/config.twig")
* @Route("/%eccube_admin_route%/product_review/config", name="product_review42_admin_config")
* @Template("@ProductReview42/admin/config.twig")
*
* @param Request $request
* @param ProductReviewConfigRepository $configRepository
Expand All @@ -47,7 +47,7 @@ public function index(Request $request, ProductReviewConfigRepository $configRep
log_info('Product review config', ['status' => 'Success']);
$this->addSuccess('product_review.admin.save.complete', 'admin');

return $this->redirectToRoute('product_review4_admin_config');
return $this->redirectToRoute('product_review42_admin_config');
}

return [
Expand Down
18 changes: 9 additions & 9 deletions Controller/Admin/ProductReviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Controller\Admin;
namespace Plugin\ProductReview42\Controller\Admin;

use Eccube\Controller\AbstractController;
use Eccube\Repository\Master\PageMaxRepository;
use Eccube\Service\CsvExportService;
use Eccube\Util\FormUtil;
use Knp\Component\Pager\PaginatorInterface;
use Plugin\ProductReview4\Entity\ProductReview;
use Plugin\ProductReview4\Entity\ProductReviewConfig;
use Plugin\ProductReview4\Form\Type\Admin\ProductReviewSearchType;
use Plugin\ProductReview4\Form\Type\Admin\ProductReviewType;
use Plugin\ProductReview4\Repository\ProductReviewConfigRepository;
use Plugin\ProductReview4\Repository\ProductReviewRepository;
use Plugin\ProductReview42\Entity\ProductReview;
use Plugin\ProductReview42\Entity\ProductReviewConfig;
use Plugin\ProductReview42\Form\Type\Admin\ProductReviewSearchType;
use Plugin\ProductReview42\Form\Type\Admin\ProductReviewType;
use Plugin\ProductReview42\Repository\ProductReviewConfigRepository;
use Plugin\ProductReview42\Repository\ProductReviewRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
Expand Down Expand Up @@ -79,7 +79,7 @@ public function __construct(
*
* @Route("/%eccube_admin_route%/product_review/", name="product_review_admin_product_review")
* @Route("/%eccube_admin_route%/product_review/page/{page_no}", requirements={"page_no" = "\d+"}, name="product_review_admin_product_review_page")
* @Template("@ProductReview4/admin/index.twig")
* @Template("@ProductReview42/admin/index.twig")
*
* @param Request $request
* @param null $page_no
Expand Down Expand Up @@ -169,7 +169,7 @@ public function index(Request $request, $page_no = null, PaginatorInterface $pag
* 編集.
*
* @Route("%eccube_admin_route%/product_review/{id}/edit", name="product_review_admin_product_review_edit")
* @Template("@ProductReview4/admin/edit.twig")
* @Template("@ProductReview42/admin/edit.twig")
*
* @param Request $request
* @param $id
Expand Down
18 changes: 9 additions & 9 deletions Controller/ProductReviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Controller;
namespace Plugin\ProductReview42\Controller;

use Eccube\Controller\AbstractController;
use Eccube\Entity\Master\ProductStatus;
use Eccube\Entity\Product;
use Plugin\ProductReview4\Entity\ProductReview;
use Plugin\ProductReview4\Entity\ProductReviewStatus;
use Plugin\ProductReview4\Form\Type\ProductReviewType;
use Plugin\ProductReview4\Repository\ProductReviewRepository;
use Plugin\ProductReview4\Repository\ProductReviewStatusRepository;
use Plugin\ProductReview42\Entity\ProductReview;
use Plugin\ProductReview42\Entity\ProductReviewStatus;
use Plugin\ProductReview42\Form\Type\ProductReviewType;
use Plugin\ProductReview42\Repository\ProductReviewRepository;
use Plugin\ProductReview42\Repository\ProductReviewStatusRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\RedirectResponse;
Expand Down Expand Up @@ -86,7 +86,7 @@ public function index(Request $request, Product $Product)
case 'confirm':
log_info('Product review config confirm');

return $this->render('ProductReview4/Resource/template/default/confirm.twig', [
return $this->render('ProductReview42/Resource/template/default/confirm.twig', [
'form' => $form->createView(),
'Product' => $Product,
'ProductReview' => $ProductReview,
Expand Down Expand Up @@ -119,7 +119,7 @@ public function index(Request $request, Product $Product)
}
}

return $this->render('ProductReview4/Resource/template/default/index.twig', [
return $this->render('ProductReview42/Resource/template/default/index.twig', [
'Product' => $Product,
'ProductReview' => $ProductReview,
'form' => $form->createView(),
Expand All @@ -130,7 +130,7 @@ public function index(Request $request, Product $Product)
* Complete.
*
* @Route("/product_review/{id}/complete", name="product_review_complete", requirements={"id" = "\d+"})
* @Template("ProductReview4/Resource/template/default/complete.twig")
* @Template("ProductReview42/Resource/template/default/complete.twig")
*
* @param $id
*
Expand Down
14 changes: 7 additions & 7 deletions Entity/ProductReview.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Entity;
namespace Plugin\ProductReview42\Entity;

use Doctrine\ORM\Mapping as ORM;
use Eccube\Entity\AbstractEntity;
Expand All @@ -23,7 +23,7 @@
* ProductReview
*
* @ORM\Table(name="plg_product_review")
* @ORM\Entity(repositoryClass="Plugin\ProductReview4\Repository\ProductReviewRepository")
* @ORM\Entity(repositoryClass="Plugin\ProductReview42\Repository\ProductReviewRepository")
*/
class ProductReview extends AbstractEntity
{
Expand Down Expand Up @@ -116,9 +116,9 @@ class ProductReview extends AbstractEntity
private $update_date;

/**
* @var \Plugin\ProductReview4\Entity\ProductReviewStatus
* @var \Plugin\ProductReview42\Entity\ProductReviewStatus
*
* @ORM\ManyToOne(targetEntity="Plugin\ProductReview4\Entity\ProductReviewStatus")
* @ORM\ManyToOne(targetEntity="Plugin\ProductReview42\Entity\ProductReviewStatus")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="status_id", referencedColumnName="id")
* })
Expand Down Expand Up @@ -328,17 +328,17 @@ public function getCustomer()
}

/**
* @return \Plugin\ProductReview4\Entity\ProductReviewStatus
* @return \Plugin\ProductReview42\Entity\ProductReviewStatus
*/
public function getStatus()
{
return $this->Status;
}

/**
* @param \Plugin\ProductReview4\Entity\ProductReviewStatus $status
* @param \Plugin\ProductReview42\Entity\ProductReviewStatus $status
*/
public function setStatus(\Plugin\ProductReview4\Entity\ProductReviewStatus $Status)
public function setStatus(\Plugin\ProductReview42\Entity\ProductReviewStatus $Status)
{
$this->Status = $Status;
}
Expand Down
4 changes: 2 additions & 2 deletions Entity/ProductReviewConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Entity;
namespace Plugin\ProductReview42\Entity;

use Doctrine\ORM\Mapping as ORM;
use Eccube\Entity\AbstractEntity;
Expand All @@ -21,7 +21,7 @@
* ProductReviewConfig
*
* @ORM\Table(name="plg_product_review_config")
* @ORM\Entity(repositoryClass="Plugin\ProductReview4\Repository\ProductReviewConfigRepository")
* @ORM\Entity(repositoryClass="Plugin\ProductReview42\Repository\ProductReviewConfigRepository")
*/
class ProductReviewConfig extends AbstractEntity
{
Expand Down
4 changes: 2 additions & 2 deletions Entity/ProductReviewStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Entity;
namespace Plugin\ProductReview42\Entity;

use Doctrine\ORM\Mapping as ORM;
use Eccube\Entity\Master\AbstractMasterEntity;
Expand All @@ -20,7 +20,7 @@
* ProductReviewStatus
*
* @ORM\Table(name="plg_product_review_status")
* @ORM\Entity(repositoryClass="Plugin\ProductReview4\Repository\ProductReviewStatusRepository")
* @ORM\Entity(repositoryClass="Plugin\ProductReview42\Repository\ProductReviewStatusRepository")
*/
class ProductReviewStatus extends AbstractMasterEntity
{
Expand Down
4 changes: 2 additions & 2 deletions Form/Type/Admin/ProductReviewConfigType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Form\Type\Admin;
namespace Plugin\ProductReview42\Form\Type\Admin;

use Eccube\Common\EccubeConfig;
use Plugin\ProductReview4\Entity\ProductReviewConfig;
use Plugin\ProductReview42\Entity\ProductReviewConfig;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\FormBuilderInterface;
Expand Down
4 changes: 2 additions & 2 deletions Form/Type/Admin/ProductReviewSearchType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Form\Type\Admin;
namespace Plugin\ProductReview42\Form\Type\Admin;

use Eccube\Common\EccubeConfig;
use Eccube\Form\Type\Master\SexType;
use Plugin\ProductReview4\Entity\ProductReviewStatus;
use Plugin\ProductReview42\Entity\ProductReviewStatus;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
Expand Down
4 changes: 2 additions & 2 deletions Form/Type/Admin/ProductReviewType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Form\Type\Admin;
namespace Plugin\ProductReview42\Form\Type\Admin;

use Eccube\Common\EccubeConfig;
use Eccube\Form\Type\Master\SexType;
use Plugin\ProductReview4\Entity\ProductReviewStatus;
use Plugin\ProductReview42\Entity\ProductReviewStatus;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
Expand Down
2 changes: 1 addition & 1 deletion Form/Type/ProductReviewType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace Plugin\ProductReview4\Form\Type;
namespace Plugin\ProductReview42\Form\Type;

use Eccube\Common\EccubeConfig;
use Eccube\Form\Type\Master\SexType;
Expand Down
Loading