PHP Класс acp_styles

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

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

Свойство Тип Описание
$u_action

Защищенные свойства (Protected)

Свойство Тип Описание
$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

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

Метод Описание
main ( $id, $mode )
sort_styles ( $style1, $style2 ) Sort styles

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

Метод Описание
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

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

action_activate() защищенный метод

Activate styles
protected action_activate ( )

action_deactivate() защищенный метод

Deactivate styles
protected action_deactivate ( )

action_details() защищенный метод

Show style details
protected action_details ( )

action_install() защищенный метод

Install style(s)
protected action_install ( )

action_uninstall() защищенный метод

Confirm styles removal
protected action_uninstall ( )

action_uninstall_confirmed() защищенный метод

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() защищенный метод

This bitfield decides which bbcodes are defined in a template.
protected default_bitfield ( ) : string
Результат string Bitfield

delete_style_files() защищенный метод

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
Результат boolean True on success, false on error

find_available() защищенный метод

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
Результат array List of styles

find_possible_parents() защищенный метод

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
Результат array Style ids, names and levels

find_style_dirs() защищенный метод

Find all directories that have styles
protected find_style_dirs ( ) : array
Результат array Directory names

frontend() защищенный метод

Main page
protected frontend ( )

get_styles() защищенный метод

Lists all styles
protected get_styles ( ) : array
Результат array Rows with styles data

get_users() защищенный метод

Count users for each style
protected get_users ( ) : array
Результат array Styles in following format: [style_id] = number of users

install_style() защищенный метод

Install style
protected install_style ( array $style ) : integer
$style array style data
Результат integer Style id

list_style() защищенный метод

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

main() публичный метод

public main ( $id, $mode )

read_style_cfg() защищенный метод

Read style configuration file
protected read_style_cfg ( string $dir ) : array | boolean
$dir string style directory
Результат array | boolean Style data, false on error

request_vars() защищенный метод

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
Результат array Items

show_available() защищенный метод

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

show_available_child_styles() защищенный метод

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() защищенный метод

List installed styles
protected show_installed ( )

show_styles_list() защищенный метод

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() публичный метод

Sort styles
public sort_styles ( $style1, $style2 )

uninstall_style() защищенный метод

Uninstall style
protected uninstall_style ( array $style ) : boolean | string
$style array Style data
Результат boolean | string True on success, error message on error

update_styles_tree() защищенный метод

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
Результат boolean True if something was updated, false if not

welcome_message() защищенный метод

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

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

$auth защищенное свойство

protected auth,phpbb\auth $auth
Результат phpbb\auth\auth

$cache защищенное свойство

protected driver_interface,phpbb\cache\driver $cache
Результат phpbb\cache\driver\driver_interface

$config защищенное свойство

protected config,phpbb\config $config
Результат phpbb\config\config

$db защищенное свойство

protected driver_interface,phpbb\db\driver $db
Результат phpbb\db\driver\driver_interface

$default_style защищенное свойство

protected $default_style

$mode защищенное свойство

protected $mode

$php_ext защищенное свойство

protected string $php_ext
Результат string

$phpbb_root_path защищенное свойство

protected string $phpbb_root_path
Результат string

$request защищенное свойство

protected request_interface,phpbb\request $request
Результат phpbb\request\request_interface

$reserved_style_names защищенное свойство

protected $reserved_style_names

$s_hidden_fields защищенное свойство

protected $s_hidden_fields

$styles_list_cols защищенное свойство

protected $styles_list_cols

$styles_path защищенное свойство

protected $styles_path

$styles_path_absolute защищенное свойство

protected $styles_path_absolute

$template защищенное свойство

protected template,phpbb\template $template
Результат phpbb\template\template

$text_formatter_cache защищенное свойство

protected cache_interface,phpbb\textformatter $text_formatter_cache
Результат phpbb\textformatter\cache_interface

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

public $u_action

$u_base_action защищенное свойство

protected $u_base_action

$user защищенное свойство

protected user,phpbb $user
Результат phpbb\user