Skip to content

Úkol 2 - Aleš Kúdela#23

Open
Aleku22 wants to merge 4 commits intoczcodecamp:masterfrom
Aleku22:paginator
Open

Úkol 2 - Aleš Kúdela#23
Aleku22 wants to merge 4 commits intoczcodecamp:masterfrom
Aleku22:paginator

Conversation

@Aleku22
Copy link
Copy Markdown

@Aleku22 Aleku22 commented Oct 16, 2016

Aleš

if (!$category) {
throw new NotFoundHttpException("Kategorie neexistuje");
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty ponechané whitespacy, pryč (zde a :30)

}
}

/* public function renderShow($id, $page, $more = null, $order = null) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zakomentovaný kód většinou necommitujeme, nebo píšeme proč je zakomentovaný. Za půl roku nebudeš vědět proč tu je :)

}

$paginator = new PaginatorHelper;
$products = $this->getDoctrine()->getRepository(Product::class)->countByCategory($category);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odsazení oproti zbytku kódu

$page = $request->query->get('page');

$paginator = new PaginatorHelper;
$products = $this->getDoctrine()->getRepository(Product::class)->countAll();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odsazení oproti zbytku kódu

],
21
$paginator->getLength(),
$paginator->getOffset()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odsazení oproti zbytku kódu

@@ -0,0 +1,256 @@
<?php
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Palec nahoru za použití knihovny odjinud 👍

@vasekboch vasekboch changed the title Paginator Úkol 2 - Aleš Kúdela Oct 16, 2016
')
->setParameter("lft", $category->getLeft())
->setParameter("rgt", $category->getRight());
dump($query->getScalarResult());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zapomenutý debug výstup :)

Copy link
Copy Markdown
Collaborator

@vasekboch vasekboch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hej za mě úplně v pohodě řešení. Až na čistotu výstupu nemám výhrad. Možná to vypadá jako banalita, ale v tom kódu se po tobě musí vyznat další lidé. A proto je potřeba menší štábní kultura :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants