Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getValidateNameQuery example
public
function
validateNameAction
(
)
{
$this
->
Front
(
)
->
Plugins
(
)
->
Json
(
)
->
setRenderer
(
false
)
;
if
(
!
(
$name
=
$this
->
Request
(
)
->
getParam
(
'value'
)
)
)
{
return
;
}
$id
=
$this
->
Request
(
)
->
getParam
(
'param', false
)
;
$mail
=
$this
->
getRepository
(
)
->
getValidateNameQuery
(
$name
,
$id
)
->
getResult
(
AbstractQuery::HYDRATE_OBJECT
)
;
if
(
!
empty
(
$mail
)
)
{
$this
->
View
(
)
->
assign
(
[
'success' => false, 'message' => 'Mail found found'
]
)
;
return
;
}
echo
'true';
}