\MslsBlogCollection

Collection of blog-objects

Implements the interface IMslsRegistryInstance because we want to work with a singleton instance of MslsBlogCollection all the time.

Summary

Methods
Properties
Constants
__construct()
get_configured_blog_description()
get_blogs_of_reference_user()
get_current_blog_id()
has_current_blog()
get_current_blog()
get_objects()
is_plugin_active()
get_plugin_active_blogs()
get()
get_filtered()
get_users()
instance()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$current_blog_id
$current_blog_output
$objects
$objects_order
$active_plugins
N/A

Properties

$current_blog_id

$current_blog_id : int

ID of the current blog

Type

int

$current_blog_output

$current_blog_output : bool

True if the current blog should be in the output

Type

bool

$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

__construct()

__construct()

Constructor

get_configured_blog_description()

get_configured_blog_description(int $blog_id, string|bool $description) : string|bool

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

Parameters

int $blog_id
string|bool $description

Returns

string|bool

get_blogs_of_reference_user()

get_blogs_of_reference_user(\MslsOptions $options) : array

Get 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

\MslsOptions $options

Returns

array

get_current_blog_id()

get_current_blog_id() : int

Get the id of the current blog

Returns

int

has_current_blog()

has_current_blog() : bool

Check if current blog is in the collection

Returns

bool

get_current_blog()

get_current_blog() : \MslsBlog|null

Get current blog as object

Returns

\MslsBlog|null

get_objects()

get_objects() : array

Get an array with all blog-objects

Returns

array

is_plugin_active()

is_plugin_active(int $blog_id) : bool

Is plugin active in the blog with that blog_id

Parameters

int $blog_id

Returns

bool

get_plugin_active_blogs()

get_plugin_active_blogs() : array

Get only blogs where the plugin is active

Returns

array

get()

get() : array

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

Returns

array

get_filtered()

get_filtered(bool $filter) : array

Get an array with filtered blog-objects

Parameters

bool $filter

Returns

array

get_users()

get_users(string $fields, int $number) : array

Get the registered users of the current blog

Parameters

string $fields
int $number

Returns

array

instance()

instance() : \MslsBlogCollection

Get or create an instance of MslsBlogCollection

Returns

\MslsBlogCollection