PHP Class acp_styles

Exibir arquivo Open project: phpbb/phpbb Class Usage Examples

Public Properties

Property Type Description
$u_action

Protected Properties

Property 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

Public Methods

Method Description
main ( $id, $mode )
sort_styles ( $style1, $style2 ) Sort styles

Protected Methods

Method 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 method

Activate styles
protected action_activate ( )

action_deactivate() protected method

Deactivate styles
protected action_deactivate ( )

action_details() protected method

Show style details
protected action_details ( )

action_install() protected method

Install style(s)
protected action_install ( )

action_uninstall() protected method

Confirm styles removal
protected action_uninstall ( )

action_uninstall_confirmed() protected method

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 method

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

delete_style_files() protected method

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
return boolean True on success, false on error

find_available() protected method

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
return array List of styles

find_possible_parents() protected method

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
return array Style ids, names and levels

find_style_dirs() protected method

Find all directories that have styles
protected find_style_dirs ( ) : array
return array Directory names

frontend() protected method

Main page
protected frontend ( )

get_styles() protected method

Lists all styles
protected get_styles ( ) : array
return array Rows with styles data

get_users() protected method

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

install_style() protected method

Install style
protected install_style ( array $style ) : integer
$style array style data
return integer Style id

list_style() protected method

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

main() public method

public main ( $id, $mode )

read_style_cfg() protected method

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

request_vars() protected method

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
return array Items

show_available() protected method

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

show_available_child_styles() protected method

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 method

List installed styles
protected show_installed ( )

show_styles_list() protected method

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 method

Sort styles
public sort_styles ( $style1, $style2 )

uninstall_style() protected method

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

update_styles_tree() protected method

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
return boolean True if something was updated, false if not

welcome_message() protected method

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
return phpbb\auth\auth

$cache protected_oe property

protected driver_interface,phpbb\cache\driver $cache
return phpbb\cache\driver\driver_interface

$config protected_oe property

protected config,phpbb\config $config
return phpbb\config\config

$db protected_oe property

protected driver_interface,phpbb\db\driver $db
return 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
return string

$phpbb_root_path protected_oe property

protected string $phpbb_root_path
return string

$request protected_oe property

protected request_interface,phpbb\request $request
return 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
return phpbb\template\template

$text_formatter_cache protected_oe property

protected cache_interface,phpbb\textformatter $text_formatter_cache
return 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
return phpbb\user