PHP Класс SettingsController, vanilla

Наследование: extends BackEndController
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$Form Gdn_Form
$ModuleSortContainer string
$RequiredAdminPermissions List of permissions that should all have access to main dashboard.
$Uses Models to automatically instantiate.

Открытые методы

Метод Описание
addUpdateCheck ( ) Adds information to the definition list that causes the app to "phone home" and see if there are upgrades available.
analyticsTick ( ) Handle the tracking of a page tick.
applications ( string $Filter = '', string $ApplicationName = '' ) Application management screen.
avatars ( ) Settings page for managing avatar settings.
banner ( ) Banner management screen.
bans ( string $Action = '', string $Search = '', integer $Page = '', integer $ID = '' ) Manage user bans (add, edit, delete, list).
cancelPreview ( string $previewThemeFolder = '', string $transientKey = '' ) Closes theme preview.
compareAddonName ( array $A, array $B ) : integer Compare addon names for uasort.
configuration ( )
defaultAvatar ( ) Settings page for uploading, deleting and cropping the default avatar.
disableApplication ( $addonName, $filter )
disableLocale ( $addonName, $addonInfo )
disablePlugin ( $pluginName, $filter = 'all' )
email ( ) Outgoing Email management screen.
emailImageUrl ( ) Endpoint for retrieving current email image url.
emailPreview ( ) Echoes out a test email with the colors and image in the post request.
emailStyles ( ) Settings page for HTML email styling.
emailTest ( ) Form for sending a test email.
enableApplication ( $addonName, $filter )
enableLocale ( $addonName, $addonInfo )
enablePlugin ( $pluginName, $filter = 'all' )
getBanModel ( ) : BanModel Gets the ban model and instantiates it if it doesn't exist.
getTestEmail ( string $image = '', string $textColor = '', string $backGroundColor = '', string $containerBackgroundColor = '', string $buttonTextColor = '', string $buttonBackgroundColor = '' ) : Gdn_Email Sets up a new Gdn_Email object with a test email.
gettingStarted ( ) Prompts new admins how to get started using new install.
home ( )
homepage ( ) Homepage management screen.
index ( ) Main dashboard.
initialize ( ) Highlight menu path. Automatically run on every use.
isUploadedDefaultAvatar ( string $avatar ) : boolean Test whether a path is a relative path to the proper uploads directory.
locales ( string $Op = null, string $LocaleKey = null ) Manage list of locales.
mobileThemeOptions ( ) Manage options for a mobile theme.
mobileThemes ( string $ThemeName = '', string $TransientKey = '' ) Mobile Themes management screen.
plugins ( string $Filter = '', string $PluginName = '' ) Manage list of plugins.
previewTheme ( string $ThemeName = '', string $transientKey = '' ) Show a preview of a theme.
registration ( string $RedirectUrl = '' ) Configuration of registration settings.
removeDefaultAvatar ( ) Remove the default avatar from config & delete it.
removeEmailImage ( ) Remove the email image from config & delete it.
removeFavicon ( ) Remove the logo from config & delete it.
removeLogo ( ) Remove the logo from config & delete it.
removeMobileLogo ( ) Remove the mobile logo from config & delete it.
removeShareImage ( ) Remove the share image from config & delete it.
setEmailFormat ( $value ) Manages the Garden.Email.Format setting.
sortAddons ( array &$Array, boolean $Filter = true ) Sort list of addons for display.
testAddon ( string $AddonType = '', string $AddonName = '', string $TransientKey = '' ) Test and addon to see if there are any fatal errors during install.
themeInfo ( $themeName )
themeOptions ( ) Manage options for a theme.
themes ( string $ThemeName = '', string $TransientKey = '' ) Themes management screen.
tutorials ( string $Tutorial = '' )

Защищенные методы

Метод Описание
_banFilter ( array $Ban ) Application management screen.
_nameSort ( $A, $B )

Приватные методы

Метод Описание
deleteDefaultAvatars ( string $avatar = '' ) Deletes uploaded default avatars.
handleAddonToggle ( $addonName, $addonInfo, $type, $isEnabled, $filter = '', $action = '' )
saveDefaultAvatars ( string $source, array $thumbOptions ) : boolean Saves the default avatar to /uploads in three formats: The default image, which is not resized or cropped.
themeInfoToMediaItem ( string $themeKey, boolean $isCurrent = false ) : MediaItemModule Compiles theme info data into a media module.

Описание методов

_banFilter() защищенный Метод

Application management screen.
С версии: 2.0.0
protected _banFilter ( array $Ban )
$Ban array Data about the ban. Valid keys are BanType and BanValue. BanValue is what is to be banned. Valid values for BanType are email, ipaddress or name.

_nameSort() защищенный статический Метод

protected static _nameSort ( $A, $B )

addUpdateCheck() публичный Метод

Currently added to the dashboard only. Nothing renders with this method. It is public so it can be added by plugins.
public addUpdateCheck ( )

analyticsTick() публичный Метод

Handle the tracking of a page tick.
public analyticsTick ( )

applications() публичный Метод

Application management screen.
С версии: 2.0.0
public applications ( string $Filter = '', string $ApplicationName = '' )
$Filter string 'enabled', 'disabled', or 'all' (default)
$ApplicationName string Unique ID of app to be modified.

avatars() публичный Метод

Displays the current avatar and exposes the following config settings: Garden.Thumbnail.Size Garden.Profile.MaxWidth Garden.Profile.MaxHeight
public avatars ( )

banner() публичный Метод

Banner management screen.
С версии: 2.0.0
public banner ( )

bans() публичный Метод

Manage user bans (add, edit, delete, list).
С версии: 2.0.18
public bans ( string $Action = '', string $Search = '', integer $Page = '', integer $ID = '' )
$Action string Add, edit, delete, or none.
$Search string Term to filter ban list by.
$Page integer Page number.
$ID integer Ban ID we're editing or deleting.

cancelPreview() публичный Метод

Closes theme preview.
С версии: 2.0.0
public cancelPreview ( string $previewThemeFolder = '', string $transientKey = '' )
$previewThemeFolder string
$transientKey string

compareAddonName() публичный статический Метод

Compare addon names for uasort.
См. также: self::SortAddons()
С версии: 2.0.0
public static compareAddonName ( array $A, array $B ) : integer
$A array First addon data.
$B array Second addon data.
Результат integer Result of strcasecmp.

configuration() публичный Метод

public configuration ( )

defaultAvatar() публичный Метод

Settings page for uploading, deleting and cropping the default avatar.
public defaultAvatar ( )

disableApplication() публичный Метод

public disableApplication ( $addonName, $filter )

disableLocale() публичный Метод

public disableLocale ( $addonName, $addonInfo )

disablePlugin() публичный Метод

public disablePlugin ( $pluginName, $filter = 'all' )

email() публичный Метод

Outgoing Email management screen.
С версии: 2.0.0
public email ( )

emailImageUrl() публичный Метод

Endpoint for retrieving current email image url.
public emailImageUrl ( )

emailPreview() публичный Метод

Echoes out a test email with the colors and image in the post request.
public emailPreview ( )

emailStyles() публичный Метод

Exposes config settings: Garden.EmailTemplate.BackgroundColor Garden.EmailTemplate.ButtonBackgroundColor Garden.EmailTemplate.ButtonTextColor Garden.EmailTemplate.Image Saves the image based on 2 config settings: Garden.EmailTemplate.ImageMaxWidth (default 400px) and Garden.EmailTemplate.ImageMaxHeight (default 300px)
public emailStyles ( )

emailTest() публичный Метод

On postback, sends a test email to the addresses specified in the form.
public emailTest ( )

enableApplication() публичный Метод

public enableApplication ( $addonName, $filter )

enableLocale() публичный Метод

public enableLocale ( $addonName, $addonInfo )

enablePlugin() публичный Метод

public enablePlugin ( $pluginName, $filter = 'all' )

getBanModel() публичный Метод

Gets the ban model and instantiates it if it doesn't exist.
public getBanModel ( ) : BanModel
Результат BanModel

getTestEmail() публичный Метод

Sets up a new Gdn_Email object with a test email.
public getTestEmail ( string $image = '', string $textColor = '', string $backGroundColor = '', string $containerBackgroundColor = '', string $buttonTextColor = '', string $buttonBackgroundColor = '' ) : Gdn_Email
$image string The img src of the previewed image
$textColor string The hex color code of the text.
$backGroundColor string The hex color code of the background color.
$containerBackgroundColor string The hex color code of the container background color.
$buttonTextColor string The hex color code of the link color.
$buttonBackgroundColor string The hex color code of the button background.
Результат Gdn_Email The email object with the test colors set.

gettingStarted() публичный Метод

Prompts new admins how to get started using new install.
С версии: 2.0.0
public gettingStarted ( )

home() публичный Метод

public home ( )

homepage() публичный Метод

Homepage management screen.
С версии: 2.0.0
public homepage ( )

index() публичный Метод

You can override this method with a method in your plugin named SettingsController_Index_Create. You can hook into it with methods named SettingsController_Index_Before and SettingsController_Index_After.
С версии: 2.0.0
public index ( )

initialize() публичный Метод

Highlight menu path. Automatically run on every use.
С версии: 2.0.0
public initialize ( )

isUploadedDefaultAvatar() публичный Метод

Test whether a path is a relative path to the proper uploads directory.
public isUploadedDefaultAvatar ( string $avatar ) : boolean
$avatar string The path to the avatar image to test (most often Garden.DefaultAvatar)
Результат boolean Whether the avatar has been uploaded from the dashboard.

locales() публичный Метод

Manage list of locales.
С версии: 2.0.0
public locales ( string $Op = null, string $LocaleKey = null )
$Op string 'enable' or 'disable'
$LocaleKey string Unique ID of locale to be modified.

mobileThemeOptions() публичный Метод

Manage options for a mobile theme.
С версии: 2.0.0
public mobileThemeOptions ( )

mobileThemes() публичный Метод

Mobile Themes management screen.
С версии: 2.2.10.3
public mobileThemes ( string $ThemeName = '', string $TransientKey = '' )
$ThemeName string Unique ID.
$TransientKey string Security token.

plugins() публичный Метод

Manage list of plugins.
С версии: 2.0.0
public plugins ( string $Filter = '', string $PluginName = '' )
$Filter string 'enabled', 'disabled', or 'all' (default)
$PluginName string Unique ID of plugin to be modified.

previewTheme() публичный Метод

Show a preview of a theme.
С версии: 2.0.0
public previewTheme ( string $ThemeName = '', string $transientKey = '' )
$ThemeName string Unique ID.
$transientKey string

registration() публичный Метод

Events: BeforeRegistrationUpdate
С версии: 2.0.0
public registration ( string $RedirectUrl = '' )
$RedirectUrl string Where to send user after registration.

removeDefaultAvatar() публичный Метод

Remove the default avatar from config & delete it.
С версии: 2.0.0
public removeDefaultAvatar ( )

removeEmailImage() публичный Метод

Remove the email image from config & delete it.
public removeEmailImage ( )

removeFavicon() публичный Метод

Remove the logo from config & delete it.
С версии: 2.1
public removeFavicon ( )

removeShareImage() публичный Метод

Remove the share image from config & delete it.
С версии: 2.1
public removeShareImage ( )

setEmailFormat() публичный Метод

Manages the Garden.Email.Format setting.
public setEmailFormat ( $value )
$value Whether to send emails in plaintext.

sortAddons() публичный статический Метод

Sort list of addons for display.
С версии: 2.0.0
public static sortAddons ( array &$Array, boolean $Filter = true )
$Array array Addon data (e.g. $PluginInfo).
$Filter boolean Whether to exclude hidden addons (defaults to TRUE).

testAddon() публичный Метод

Test and addon to see if there are any fatal errors during install.
С версии: 2.0.0
public testAddon ( string $AddonType = '', string $AddonName = '', string $TransientKey = '' )
$AddonType string
$AddonName string
$TransientKey string Security token.

themeInfo() публичный Метод

public themeInfo ( $themeName )

themeOptions() публичный Метод

Manage options for a theme.
С версии: 2.0.0
public themeOptions ( )

themes() публичный Метод

Themes management screen.
С версии: 2.0.0
public themes ( string $ThemeName = '', string $TransientKey = '' )
$ThemeName string Unique ID.
$TransientKey string Security token.

tutorials() публичный Метод

public tutorials ( string $Tutorial = '' )
$Tutorial string

Описание свойств

$Form публичное свойство

public Gdn_Form $Form
Результат Gdn_Form

$ModuleSortContainer публичное свойство

public string $ModuleSortContainer
Результат string

$RequiredAdminPermissions публичное свойство

List of permissions that should all have access to main dashboard.
public $RequiredAdminPermissions

$Uses публичное свойство

Models to automatically instantiate.
public $Uses