ЭФ
Size: a a a
ЭФ
A
public function onRun()
{
$this->prepareVars();
$this->category = $this->page['category'] = $this->loadCategory();
$this->posts = $this->page['posts'] = $this->listPosts();
/*
* If the page number is not valid, redirect
*/
if ($pageNumberParam = $this->paramName('pageNumber')) {
$currentPage = $this->property('pageNumber');
if ($currentPage > ($lastPage = $this->posts->lastPage()) && $currentPage > 1) {
return Redirect::to($this->currentPageUrl([$pageNumberParam => $lastPage]));
}
}
}
A
$this->posts = $this->page['posts'] = $this->listPosts();
ЭФ
ЭФ
A
use ....Post;
public function onEnd() {
$this['posts'] = Post....;
}
ЭФ
use ....Post;
public function onEnd() {
$this['posts'] = Post....;
}
A
11
I
JT
I
I
A
A
11
11
A
A
A