Class TfPreference
Holds Tuskfish site configuration (preference) data.
A preference object is automatically instantiated on every page via tfHeader.php.
- TfPreference uses TfMagicMethods, TfLanguage
Copyright: Simon Wilkinson 2013+ (https://tuskfish.biz)
License: GNU General Public License (GPL) V2
Author: Simon Wilkinson simon@isengard.biz
Version: Release: 1.0
Since: 1.0
Uses: trait TfMagicMethods Prevents direct setting of properties / unlisted properties.
Uses: trait TfLanguage to obtain a list of available translations.
Located at trust_path/libraries/tuskfish/class/TfPreference.php
Methods summary
public
|
|
public
string
|
|
public
array
|
#
getPreferencesAsArray( )
Converts the preference object to an array suitable for insert/update calls to the database. |
public
|
#
loadPropertiesFromArray( array $dirtyInput )
Update the preference object from an external data source (eg. form submission). |
public
|
#
setAdminPagination( integer $value )
Set the number of objects to display in a single admin page view. |
public
integer
|
#
getAdminPagination( )
Returns the number of objects to display in a single admin page view, XSS safe. |
public
|
#
setSiteAuthor( string $value )
Set the name of the site author. Used to population page meta author tag. |
public
string
|
|
public
|
|
public
in
|
|
public
|
|
public
string
|
|
public
|
#
setDateFormat( string $value )
Set the date format, used to convert timestamps to human readable form. |
public
string
|
#
getDateFormat( )
Returns the data format used to convert timestamps to human readable form, XSS safe. |
public
|
|
public
string
|
#
getDefaultLanguage( )
Returns the default site language as a two-letter code XSS escaped for display. |
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
integer
|
|
public
|
|
public
integer
|
|
public
|
#
setPaginationElements( integer $value )
Set the default number of page slots to display in pagination elements. |
public
integer
|
#
getPaginationElements( )
Returns the number of slots to display in user-side pagination control, XSS safe. |
public
|
|
public
integer
|
|
public
|
|
public
Search
|
#
getSearchPagination( )
Returns the number of items to display in one page of search results, XSS safe. |
public
|
|
public
string
|
|
public
|
|
public
integer
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
#
setUserPagination( integer $value )
Set the number of objects to display in a single page view on the public facing side of the site. |
public
User
|
#
getUserPagination( )
Returns the number of objects to display in a single page view on the public side of the site, XSS escaped for display. |
Methods used from TfMagicMethods
Methods used from TfLanguage
Properties summary
protected
|
$validator
|
|
protected
|
$siteName
|
|
protected
|
$siteDescription
|
|
protected
|
$siteAuthor
|
|
protected
|
$siteEmail
|
|
protected
|
$siteCopyright
|
|
protected
|
$closeSite
|
|
protected
|
$serverTimezone
|
|
protected
|
$siteTimezone
|
|
protected
|
$minSearchLength
|
|
protected
|
$searchPagination
|
|
protected
|
$userPagination
|
|
protected
|
$adminPagination
|
|
protected
|
$galleryPagination
|
|
protected
|
$rssPosts
|
|
protected
|
$paginationElements
|
|
protected
|
$sessionName
|
|
protected
|
$sessionLife
|
|
protected
|
$defaultLanguage
|
|
protected
|
$dateFormat
|
|
protected
|
$enableCache
|
|
protected
|
$cacheLife
|
Magic properties
public
|
$validator
Instance of the Tuskfish data validator class. |
public
string
|
$siteName
Name of website. |
public
string
|
$siteDescription
Meta description of website. |
public
string
|
$siteAuthor
Author of website. |
public
string
|
$siteEmail
Administrative contact email for website. |
public
string
|
$siteCopyright
Copyright notice. |
public
integer
|
$closeSite
Toggle to close this site. |
public
string
|
$serverTimezone
Timezone of server location. |
public
string
|
$siteTimezone
Timezone for main audience location. |
public
integer
|
$minSearchLength
Minimum length of search terms. |