ProductController extends AbstractController
Table of Contents
Properties
$purchaseFlow
protected
PurchaseFlow
$purchaseFlow
$customerFavoriteProductRepository
protected
CustomerFavoriteProductRepository
$customerFavoriteProductRepository
$cartService
protected
CartService
$cartService
$productRepository
protected
ProductRepository
$productRepository
$BaseInfo
protected
BaseInfo
$BaseInfo
$helper
protected
AuthenticationUtils
$helper
$productListMaxRepository
protected
ProductListMaxRepository
$productListMaxRepository
$title
private
mixed
$title
= ''
$eccubeConfig
protected
EccubeConfig
$eccubeConfig
$entityManager
protected
EntityManagerInterface
$entityManager
$translator
protected
TranslatorInterface
$translator
$formFactory
protected
FormFactoryInterface
$formFactory
$eventDispatcher
protected
EventDispatcherInterface
$eventDispatcher
$session
protected
Session
$session
Methods
__construct()
ProductController constructor.
public
__construct(
$cartPurchaseFlow :
PurchaseFlow
, $customerFavoriteProductRepository :
CustomerFavoriteProductRepository
, $cartService :
CartService
, $productRepository :
ProductRepository
, $baseInfoRepository :
BaseInfoRepository
, $helper :
AuthenticationUtils
, $productListMaxRepository :
ProductListMaxRepository
)
: mixed
Parameters
- $cartPurchaseFlow : PurchaseFlow
- $customerFavoriteProductRepository : CustomerFavoriteProductRepository
- $cartService : CartService
- $productRepository : ProductRepository
- $baseInfoRepository : BaseInfoRepository
- $helper : AuthenticationUtils
- $productListMaxRepository : ProductListMaxRepository
Return values
mixedindex()
商品一覧画面.
public
index(
$request :
Request
, $paginator :
Paginator
)
: mixed
Parameters
- $request : Request
- $paginator : Paginator
Tags
Return values
mixeddetail()
商品詳細画面.
public
detail(
$request :
Request
, $Product :
Product
)
: array
Parameters
- $request : Request
- $Product : Product
Tags
Return values
arrayaddFavorite()
お気に入り追加.
public
addFavorite(
$request :
Request
, $Product :
Product
)
: mixed
Parameters
- $request : Request
- $Product : Product
Tags
Return values
mixedaddCart()
カートに追加.
public
addCart(
$request :
Request
, $Product :
Product
)
: mixed
Parameters
- $request : Request
- $Product : Product
Tags
Return values
mixedgetPageTitle()
ページタイトルの設定
protected
getPageTitle(
$searchData :
null|array
)
: str
Parameters
- $searchData : null|array
Return values
strcheckVisibility()
閲覧可能な商品かどうかを判定
protected
checkVisibility(
$Product :
Product
)
: bool
Parameters
- $Product : Product
Return values
bool —閲覧可能な場合はtrue
setEccubeConfig()
public
setEccubeConfig(
$eccubeConfig :
EccubeConfig
)
: mixed
Parameters
- $eccubeConfig : EccubeConfig
Tags
Return values
mixedsetEntityManager()
public
setEntityManager(
$entityManager :
EntityManagerInterface
)
: mixed
Parameters
- $entityManager : EntityManagerInterface
Tags
Return values
mixedsetTranslator()
public
setTranslator(
$translator :
TranslatorInterface
)
: mixed
Parameters
- $translator : TranslatorInterface
Tags
Return values
mixedsetSession()
public
setSession(
$session :
SessionInterface
)
: mixed
Parameters
- $session : SessionInterface
Tags
Return values
mixedsetFormFactory()
public
setFormFactory(
$formFactory :
FormFactoryInterface
)
: mixed
Parameters
- $formFactory : FormFactoryInterface
Tags
Return values
mixedsetEventDispatcher()
public
setEventDispatcher(
$eventDispatcher :
EventDispatcherInterface
)
: mixed
Parameters
- $eventDispatcher : EventDispatcherInterface
Tags
Return values
mixedaddSuccess()
public
addSuccess(
$message :
mixed
[, $namespace :
mixed
= 'front' ]
)
: mixed
Parameters
- $message : mixed
- $namespace : mixed = 'front'
Return values
mixedaddError()
public
addError(
$message :
mixed
[, $namespace :
mixed
= 'front' ]
)
: mixed
Parameters
- $message : mixed
- $namespace : mixed = 'front'
Return values
mixedaddDanger()
public
addDanger(
$message :
mixed
[, $namespace :
mixed
= 'front' ]
)
: mixed
Parameters
- $message : mixed
- $namespace : mixed = 'front'
Return values
mixedaddWarning()
public
addWarning(
$message :
mixed
[, $namespace :
mixed
= 'front' ]
)
: mixed
Parameters
- $message : mixed
- $namespace : mixed = 'front'
Return values
mixedaddInfo()
public
addInfo(
$message :
mixed
[, $namespace :
mixed
= 'front' ]
)
: mixed
Parameters
- $message : mixed
- $namespace : mixed = 'front'
Return values
mixedaddRequestError()
public
addRequestError(
$message :
mixed
[, $namespace :
mixed
= 'front' ]
)
: mixed
Parameters
- $message : mixed
- $namespace : mixed = 'front'
Return values
mixedclearMessage()
public
clearMessage(
)
: mixed
Return values
mixeddeleteMessage()
public
deleteMessage(
)
: mixed
Return values
mixedsetLoginTargetPath()
public
setLoginTargetPath(
$targetPath :
string
[, $namespace :
mixed
= null ]
)
: mixed
Parameters
- $targetPath : string
- $namespace : mixed = null
Return values
mixedforwardToRoute()
Forwards the request to another controller.
public
forwardToRoute(
$route :
string
[, $path :
array
= [] ]
[, $query :
array
= [] ]
)
: Response
Parameters
- $route : string
The name of the route
- $path : array = []
An array of path parameters
- $query : array = []
An array of query parameters
Return values
Response —A Response instance
isTokenValid()
Checks the validity of a CSRF token.
protected
isTokenValid(
)
: bool
if token is invalid, throws AccessDeniedHttpException.