mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Fix typos and bad method calls
This commit is contained in:
parent
b72c5bda99
commit
2856fc8096
4 changed files with 10 additions and 10 deletions
|
|
@ -68,7 +68,7 @@ class RequestFetcher
|
||||||
|
|
||||||
public function getIdentifierValue()
|
public function getIdentifierValue()
|
||||||
{
|
{
|
||||||
return $this->get($this->getIdentifierName(), 'id');
|
return $this->request->get($this->getIdentifierName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isCollectionPaginated()
|
public function isCollectionPaginated()
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ class ResourceController extends Controller
|
||||||
return $this->redirectToResource($resource);
|
return $this->redirectToResource($resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->isHtmlRequest()) {
|
if (!$this->getRequestFetcher()->isHtmlRequest()) {
|
||||||
return $this->handleView(View::create($form));
|
return $this->handleView(View::create($form));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -149,15 +149,15 @@ class ResourceController extends Controller
|
||||||
return $this->redirectToResource($resource);
|
return $this->redirectToResource($resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->isHtmlRequest()) {
|
if (!$this->getRequestFetcher()->isHtmlRequest()) {
|
||||||
return $this->handleView(View::create($form));
|
return $this->handleView(View::create($form));
|
||||||
}
|
}
|
||||||
|
|
||||||
$view = View::create()
|
$view = View::create()
|
||||||
->setTemplate($this->getFullTemplateName('create.html'))
|
->setTemplate($this->getFullTemplateName('create.html'))
|
||||||
->setData(array(
|
->setData(array(
|
||||||
$this->getResourceName() => $resource,
|
$this->resourceName => $resource,
|
||||||
'form' => $form->createView()
|
'form' => $form->createView()
|
||||||
))
|
))
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -197,7 +197,7 @@ class ResourceController extends Controller
|
||||||
|
|
||||||
protected function getResourceFormType()
|
protected function getResourceFormType()
|
||||||
{
|
{
|
||||||
if (null !== $type = $this->requestFetcher->getFormType()) {
|
if (null !== $type = $this->getRequestFetcher()->getFormType()) {
|
||||||
return $type;
|
return $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -206,7 +206,7 @@ class ResourceController extends Controller
|
||||||
|
|
||||||
protected function redirectToResource(ResourceInterface $resource)
|
protected function redirectToResource(ResourceInterface $resource)
|
||||||
{
|
{
|
||||||
$this->requestFetcher->getRedirect();
|
$redirect = $this->getRequestFetcher()->getRedirect();
|
||||||
$route = $redirect ? $redirect : $this->getResourceRoute();
|
$route = $redirect ? $redirect : $this->getResourceRoute();
|
||||||
|
|
||||||
return $this->handleView(RouteRedirectView::create($route, array('id' => $resource->getId())));
|
return $this->handleView(RouteRedirectView::create($route, array('id' => $resource->getId())));
|
||||||
|
|
@ -214,7 +214,7 @@ class ResourceController extends Controller
|
||||||
|
|
||||||
protected function redirectToResourceCollection()
|
protected function redirectToResourceCollection()
|
||||||
{
|
{
|
||||||
$this->requestFetcher->getRedirect();
|
$redirect = $this->getRequestFetcher()->getRedirect();
|
||||||
$route = $redirect ? $redirect : $this->getResourceCollectionRoute();
|
$route = $redirect ? $redirect : $this->getResourceCollectionRoute();
|
||||||
|
|
||||||
return $this->handleView(RouteRedirectView::create($route));
|
return $this->handleView(RouteRedirectView::create($route));
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class ResourceRepository extends BaseResourceRepository
|
||||||
|
|
||||||
if (null !== $sortBy) {
|
if (null !== $sortBy) {
|
||||||
foreach ($sortBy as $property => $order) {
|
foreach ($sortBy as $property => $order) {
|
||||||
$queryBuilder->orderBy($alias.$property, $order);
|
$queryBuilder->orderBy($alias.'.'.$property, $order);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ abstract class ResourceRepository extends BaseResourceRepository
|
||||||
|
|
||||||
public function findOneBy(array $criteria)
|
public function findOneBy(array $criteria)
|
||||||
{
|
{
|
||||||
return $this->objectRepository->findBy($criteria);
|
return $this->objectRepository->findOneBy($criteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue