tag.php

Summary
tag.php
TagAction class to contain Tag actions.
TagActionAction class to display a hashtag and posts under it
preparePrepares a tag for display based on our current notice/page
titleReturns the title of the page for the tag display
getFeedsReturns an array of the various feeds for the tag display page
showContentShows the notices containing this page, paginated according to the current settings for pagination.
isReadOnlyReturns whether this action class is read-only (yes)

Tag

Action class to contain Tag actions.

postActiv

the micro-blogging software

Copyright

Copyright © 2016-2017, Maiyannah Bishop

Derived from code copyright various sources

  • GNU Social © 2013-2016, Free Software Foundation, Inc
  • StatusNet © 2008-2012, StatusNet, Inc

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses/.

https://www.gnu.org/licenses/agpl.html

About

Action class to contain Tag actions.

PHP version

Tested with PHP 7.0

File Authors

Web

TagAction

Action class to display a hashtag and posts under it

Variables

  • notice - current notice
  • tag - current tag
  • page - current page
Summary
preparePrepares a tag for display based on our current notice/page
titleReturns the title of the page for the tag display
getFeedsReturns an array of the various feeds for the tag display page
showContentShows the notices containing this page, paginated according to the current settings for pagination.
isReadOnlyReturns whether this action class is read-only (yes)

prepare

protected function prepare(array $args = array())

Prepares a tag for display based on our current notice/page

Parameters

  • args - passed to parent prepare()

Returns

true, unless an error has been encounterd

Error Conditions

  • no valid tag data, throws a client exception
  • tag contains upperclase characters, redirects
  • page is out of bounds, 404s

title

function title()

Returns the title of the page for the tag display

getFeeds

function getFeeds()

Returns an array of the various feeds for the tag display page

showContent

protected function showContent()

Shows the notices containing this page, paginated according to the current settings for pagination.

Parameters

  • none

Returns

  • void

isReadOnly

function isReadOnly($args)

Returns whether this action class is read-only (yes)

Parameters

  • array $args - ignored

Returns

  • boolean true
protected function prepare(array $args = array())
Prepares a tag for display based on our current notice/page
function title()
Returns the title of the page for the tag display
function getFeeds()
Returns an array of the various feeds for the tag display page
protected function showContent()
Shows the notices containing this page, paginated according to the current settings for pagination.
function isReadOnly($args)
Returns whether this action class is read-only (yes)