Properties

$current_blog_id

$current_blog_id : integer

ID of the current blog

Type

integer

$current_blog_output

$current_blog_output : boolean

True if the current blog should be in the output

Type

boolean

$objects

$objects : array

Collection of MslsBlog-objects

Type

array

$objects_order

$objects_order : string

Order output by language or description

Type

string

$active_plugins

$active_plugins : array

Active plugins in the whole network

Type

array

Methods

instance()

instance() : static

Gets or creates an instance of the called class

Returns

static

__construct()

__construct() 

Constructor

get_configured_blog_description()

get_configured_blog_description(integer  $blog_id, string|boolean  $description = false) : string|boolean

Returns the description of an configured blog or false if it is not configured

Parameters

integer $blog_id
string|boolean $description

Returns

string|boolean

get_blogs_of_reference_user()

get_blogs_of_reference_user(\lloc\Msls\MslsOptions  $options) : array

Gets the list of the blogs of the reference user The first available user of the blog will be used if there is no refrence user configured

Parameters

\lloc\Msls\MslsOptions $options

Returns

array

get_blog_id()

get_blog_id(  $language) : null|string

Gets blog_id by language

Parameters

$language

Returns

null|string

get_current_blog_id()

get_current_blog_id() : integer

Get the id of the current blog

Returns

integer

is_current_blog()

is_current_blog(\lloc\Msls\MslsBlog  $blog) : boolean

Checks if blog is the current blog

Parameters

\lloc\Msls\MslsBlog $blog

Returns

boolean

has_current_blog()

has_current_blog() : boolean

Checks if current blog is in the collection

Returns

boolean

get_current_blog()

get_current_blog() : \lloc\Msls\MslsBlog|null

Gets current blog as object

Returns

\lloc\Msls\MslsBlog|null

get_objects()

get_objects() : array<mixed,\lloc\Msls\MslsBlog>

Gets an array with all blog-objects

Returns

array<mixed,\lloc\Msls\MslsBlog>

is_plugin_active()

is_plugin_active(integer  $blog_id) : boolean

Is plugin active in the blog with that blog_id

Parameters

integer $blog_id

Returns

boolean

get_plugin_active_blogs()

get_plugin_active_blogs() : array

Gets only blogs where the plugin is active

Returns

array

get()

get() : array<mixed,\lloc\Msls\MslsBlog>

Gets an array of all - but not the current - blog-objects

Returns

array<mixed,\lloc\Msls\MslsBlog>

get_filtered()

get_filtered(boolean  $filter = false) : array<mixed,\lloc\Msls\MslsBlog>

Gets an array with filtered blog-objects

Parameters

boolean $filter

Returns

array<mixed,\lloc\Msls\MslsBlog>

get_users()

get_users(string  $fields = 'all', integer|string  $number = '') : array

Gets the registered users of the current blog

Parameters

string $fields
integer|string $number

Returns

array

get_blog_language()

get_blog_language(integer  $blog_id = null, string  $default = 'en_US') : string

Returns a specific blog language.

Parameters

integer $blog_id
string $default

Returns

string