mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Fixed return tags and values
This commit is contained in:
parent
49744a0a94
commit
54aeb23356
@ -6,6 +6,7 @@ use PageController;
|
|||||||
use SilverStripe\Control\Director;
|
use SilverStripe\Control\Director;
|
||||||
use SilverStripe\Control\RSS\RSSFeed;
|
use SilverStripe\Control\RSS\RSSFeed;
|
||||||
use SilverStripe\ORM\ArrayList;
|
use SilverStripe\ORM\ArrayList;
|
||||||
|
use SilverStripe\ORM\DataList;
|
||||||
use SilverStripe\ORM\FieldType\DBDatetime;
|
use SilverStripe\ORM\FieldType\DBDatetime;
|
||||||
use SilverStripe\ORM\PaginatedList;
|
use SilverStripe\ORM\PaginatedList;
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
@ -67,7 +68,7 @@ class BlogController extends PageController
|
|||||||
/**
|
/**
|
||||||
* Renders a Blog Member's profile.
|
* Renders a Blog Member's profile.
|
||||||
*
|
*
|
||||||
* @return HTTPResponse
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function profile()
|
public function profile()
|
||||||
{
|
{
|
||||||
@ -121,7 +122,7 @@ class BlogController extends PageController
|
|||||||
/**
|
/**
|
||||||
* Renders an archive for a specified date. This can be by year or year/month.
|
* Renders an archive for a specified date. This can be by year or year/month.
|
||||||
*
|
*
|
||||||
* @return null|HTTPResponse
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function archive()
|
public function archive()
|
||||||
{
|
{
|
||||||
@ -212,7 +213,7 @@ class BlogController extends PageController
|
|||||||
/**
|
/**
|
||||||
* Renders the blog posts for a given tag.
|
* Renders the blog posts for a given tag.
|
||||||
*
|
*
|
||||||
* @return null|HTTPResponse
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function tag()
|
public function tag()
|
||||||
{
|
{
|
||||||
@ -258,7 +259,7 @@ class BlogController extends PageController
|
|||||||
/**
|
/**
|
||||||
* Renders the blog posts for a given category.
|
* Renders the blog posts for a given category.
|
||||||
*
|
*
|
||||||
* @return null|HTTPResponse
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function category()
|
public function category()
|
||||||
{
|
{
|
||||||
@ -440,7 +441,7 @@ class BlogController extends PageController
|
|||||||
*
|
*
|
||||||
* @example "<% if $PaginationAbsoluteNextLink %><link rel="next" href="$PaginationAbsoluteNextLink"><% end_if %>"
|
* @example "<% if $PaginationAbsoluteNextLink %><link rel="next" href="$PaginationAbsoluteNextLink"><% end_if %>"
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function PaginationAbsoluteNextLink()
|
public function PaginationAbsoluteNextLink()
|
||||||
{
|
{
|
||||||
@ -448,6 +449,8 @@ class BlogController extends PageController
|
|||||||
if ($posts->NotLastPage()) {
|
if ($posts->NotLastPage()) {
|
||||||
return Director::absoluteURL($posts->NextLink());
|
return Director::absoluteURL($posts->NextLink());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -456,7 +459,7 @@ class BlogController extends PageController
|
|||||||
*
|
*
|
||||||
* @example "<% if $PaginationAbsolutePrevLink %><link rel="prev" href="$PaginationAbsolutePrevLink"><% end_if %>"
|
* @example "<% if $PaginationAbsolutePrevLink %><link rel="prev" href="$PaginationAbsolutePrevLink"><% end_if %>"
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function PaginationAbsolutePrevLink()
|
public function PaginationAbsolutePrevLink()
|
||||||
{
|
{
|
||||||
@ -464,6 +467,8 @@ class BlogController extends PageController
|
|||||||
if ($posts->NotFirstPage()) {
|
if ($posts->NotFirstPage()) {
|
||||||
return Director::absoluteURL($posts->PrevLink());
|
return Director::absoluteURL($posts->PrevLink());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -486,7 +491,7 @@ class BlogController extends PageController
|
|||||||
/**
|
/**
|
||||||
* Returns the current archive date.
|
* Returns the current archive date.
|
||||||
*
|
*
|
||||||
* @return null|Date
|
* @return null|DBDatetime
|
||||||
*/
|
*/
|
||||||
public function getArchiveDate()
|
public function getArchiveDate()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user