PHP Class acp_styles

Afficher le fichier Open project: phpbb/phpbb Class Usage Examples

Méthodes publiques

Свойство Type Description
$u_action

Protected Properties

Свойство Type Description
$auth phpbb\auth\auth
$cache phpbb\cache\driver\driver_interface
$config phpbb\config\config
$db phpbb\db\driver\driver_interface
$default_style
$mode
$php_ext string
$phpbb_root_path string
$request phpbb\request\request_interface
$reserved_style_names
$s_hidden_fields
$styles_list_cols
$styles_path
$styles_path_absolute
$template phpbb\template\template
$text_formatter_cache phpbb\textformatter\cache_interface
$u_base_action
$user phpbb\user

Méthodes publiques

Méthode Description
main ( $id, $mode )
sort_styles ( $style1, $style2 ) Sort styles

Méthodes protégées

Méthode Description
action_activate ( ) Activate styles
action_deactivate ( ) Deactivate styles
action_details ( ) Show style details
action_install ( ) Install style(s)
action_uninstall ( ) Confirm styles removal
action_uninstall_confirmed ( array $ids, boolean $delete_files ) Uninstall styles(s)
default_bitfield ( ) : string Generates default bitfield
delete_style_files ( string $path, string $dir = '' ) : boolean Delete all files in style directory
find_available ( boolean $all ) : array Find styles available for installation
find_possible_parents ( array $styles, integer $id, integer $parent, integer $level ) : array Find all possible parent styles for style
find_style_dirs ( ) : array Find all directories that have styles
frontend ( ) Main page
get_styles ( ) : array Lists all styles
get_users ( ) : array Count users for each style
install_style ( array $style ) : integer Install style
list_style ( array &$style, integer $level ) Show item in styles list
read_style_cfg ( string $dir ) : array | boolean Read style configuration file
request_vars ( string $name, string | integer $default, boolean $error = false ) : array Get list of items from posted data
show_available ( ) Show list of styles that can be installed
show_available_child_styles ( array &$styles, string $name, integer $level ) Show available styles tree
show_installed ( ) List installed styles
show_styles_list ( array &$styles, integer $parent, integer $level ) Show styles list
uninstall_style ( array $style ) : boolean | string Uninstall style
update_styles_tree ( array &$styles, array | false $style = false ) : boolean Update styles tree
welcome_message ( string $title, string $description ) Show welcome message

Method Details

action_activate() protected méthode

Activate styles
protected action_activate ( )

action_deactivate() protected méthode

Deactivate styles
protected action_deactivate ( )

action_details() protected méthode

Show style details
protected action_details ( )

action_install() protected méthode

Install style(s)
protected action_install ( )

action_uninstall() protected méthode

Confirm styles removal
protected action_uninstall ( )

action_uninstall_confirmed() protected méthode

Uninstall styles(s)
protected action_uninstall_confirmed ( array $ids, boolean $delete_files )
$ids array List of style IDs
$delete_files boolean If true, script will attempt to remove files for selected styles

default_bitfield() protected méthode

This bitfield decides which bbcodes are defined in a template.
protected default_bitfield ( ) : string
Résultat string Bitfield

delete_style_files() protected méthode

Delete all files in style directory
protected delete_style_files ( string $path, string $dir = '' ) : boolean
$path string Style directory
$dir string Directory to remove inside style's directory
Résultat boolean True on success, false on error

find_available() protected méthode

Find styles available for installation
protected find_available ( boolean $all ) : array
$all boolean if true, function will return all installable styles. if false, function will return only styles that can be installed
Résultat array List of styles

find_possible_parents() protected méthode

Find all possible parent styles for style
protected find_possible_parents ( array $styles, integer $id, integer $parent, integer $level ) : array
$styles array list of styles
$id integer id of style
$parent integer current parent style id
$level integer current tree level
Résultat array Style ids, names and levels

find_style_dirs() protected méthode

Find all directories that have styles
protected find_style_dirs ( ) : array
Résultat array Directory names

frontend() protected méthode

Main page
protected frontend ( )

get_styles() protected méthode

Lists all styles
protected get_styles ( ) : array
Résultat array Rows with styles data

get_users() protected méthode

Count users for each style
protected get_users ( ) : array
Résultat array Styles in following format: [style_id] = number of users

install_style() protected méthode

Install style
protected install_style ( array $style ) : integer
$style array style data
Résultat integer Style id

list_style() protected méthode

Show item in styles list
protected list_style ( array &$style, integer $level )
$style array style row
$level integer style inheritance level

main() public méthode

public main ( $id, $mode )

read_style_cfg() protected méthode

Read style configuration file
protected read_style_cfg ( string $dir ) : array | boolean
$dir string style directory
Résultat array | boolean Style data, false on error

request_vars() protected méthode

Get list of items from posted data
protected request_vars ( string $name, string | integer $default, boolean $error = false ) : array
$name string Variable name
$default string | integer Default value for array
$error boolean If true, error will be triggered if list is empty
Résultat array Items

show_available() protected méthode

Show list of styles that can be installed
protected show_available ( )

show_available_child_styles() protected méthode

Show available styles tree
protected show_available_child_styles ( array &$styles, string $name, integer $level )
$styles array Styles list, passed as reference
$name string Name of parent style
$level integer Styles tree level

show_installed() protected méthode

List installed styles
protected show_installed ( )

show_styles_list() protected méthode

Show styles list
protected show_styles_list ( array &$styles, integer $parent, integer $level )
$styles array styles list
$parent integer parent style id
$level integer style inheritance level

sort_styles() public méthode

Sort styles
public sort_styles ( $style1, $style2 )

uninstall_style() protected méthode

Uninstall style
protected uninstall_style ( array $style ) : boolean | string
$style array Style data
Résultat boolean | string True on success, error message on error

update_styles_tree() protected méthode

Update styles tree
protected update_styles_tree ( array &$styles, array | false $style = false ) : boolean
$styles array Styles list, passed as reference
$style array | false Current style, false if root
Résultat boolean True if something was updated, false if not

welcome_message() protected méthode

Show welcome message
protected welcome_message ( string $title, string $description )
$title string main title
$description string page description

Property Details

$auth protected_oe property

protected auth,phpbb\auth $auth
Résultat phpbb\auth\auth

$cache protected_oe property

protected driver_interface,phpbb\cache\driver $cache
Résultat phpbb\cache\driver\driver_interface

$config protected_oe property

protected config,phpbb\config $config
Résultat phpbb\config\config

$db protected_oe property

protected driver_interface,phpbb\db\driver $db
Résultat phpbb\db\driver\driver_interface

$default_style protected_oe property

protected $default_style

$mode protected_oe property

protected $mode

$php_ext protected_oe property

protected string $php_ext
Résultat string

$phpbb_root_path protected_oe property

protected string $phpbb_root_path
Résultat string

$request protected_oe property

protected request_interface,phpbb\request $request
Résultat phpbb\request\request_interface

$reserved_style_names protected_oe property

protected $reserved_style_names

$s_hidden_fields protected_oe property

protected $s_hidden_fields

$styles_list_cols protected_oe property

protected $styles_list_cols

$styles_path protected_oe property

protected $styles_path

$styles_path_absolute protected_oe property

protected $styles_path_absolute

$template protected_oe property

protected template,phpbb\template $template
Résultat phpbb\template\template

$text_formatter_cache protected_oe property

protected cache_interface,phpbb\textformatter $text_formatter_cache
Résultat phpbb\textformatter\cache_interface

$u_action public_oe property

public $u_action

$u_base_action protected_oe property

protected $u_base_action

$user protected_oe property

protected user,phpbb $user
Résultat phpbb\user