MetaFox

TypeManager
in package
implements TypeManager

Class TypeManager.

Table of Contents

Interfaces

TypeManager
Interface TypeManager.

Constants

CACHE_LIFETIME  = 3000
CACHE_NAME  = 'activity_type_manager_cache'
DEFAULT_CACHE_NAME  = 'activity_type_manager_default_cache'
VIEW_ON_HOME  = 'home'
VIEW_ON_PROFILE  = 'profile'

Properties

$defaultTypes  : mixed
$types  : mixed

Methods

__construct()  : mixed
cleanData()  : void
getAbilities()  : array<string|int, mixed>
getDefaultSettings()  : array<string|int, mixed>
getDefaultSettingsByType()  : array<string|int, mixed>
getDisabledSettings()  : array<string|int, mixed>
getTypePhrase()  : string|null
getTypePhraseWithContext()  : string|null
getTypes()  : array<string|int, mixed>
getTypeSettings()  : array<string|int, mixed>
hasFeature()  : bool
hasSetting()  : bool
isActive()  : bool
isDisabled()  : bool
makeType()  : Type|false
Create or update an activity type.
refresh()  : void
start()  : void

Constants

CACHE_NAME

private string CACHE_NAME = 'activity_type_manager_cache'

DEFAULT_CACHE_NAME

private string DEFAULT_CACHE_NAME = 'activity_type_manager_default_cache'

VIEW_ON_PROFILE

private mixed VIEW_ON_PROFILE = 'profile'

Properties

Methods

getAbilities()

public getAbilities() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDefaultSettings()

public getDefaultSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDefaultSettingsByType()

public getDefaultSettingsByType(string $type) : array<string|int, mixed>
Parameters
$type : string
Return values
array<string|int, mixed>

getDisabledSettings()

public getDisabledSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTypePhrase()

public getTypePhrase(string $type) : string|null
Parameters
$type : string
Return values
string|null

getTypePhraseWithContext()

public getTypePhraseWithContext(Feed $feed[, int $profileId = 0 ]) : string|null
Parameters
$feed : Feed
$profileId : int = 0
Return values
string|null

getTypes()

public getTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTypeSettings()

public getTypeSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasFeature()

public hasFeature(string $type, string $feature) : bool
Parameters
$type : string
$feature : string
Return values
bool

hasSetting()

public hasSetting(string $type, string $feature) : bool
Parameters
$type : string
$feature : string
Return values
bool

isActive()

public isActive(string $type) : bool
Parameters
$type : string
Return values
bool

isDisabled()

public isDisabled(string $typeName, string $settingName) : bool
Parameters
$typeName : string
$settingName : string
Return values
bool

makeType()

Create or update an activity type.

public makeType(array<string, mixed> $data) : Type|false

Note: this method won't purge cache. Please purge cache manually.

Parameters
$data : array<string, mixed>
Return values
Type|false

        
On this page

Search results