class Service (View source)

Properties

protected EntityManagerInterface $entityManager
protected Application $app
protected Repository $config
protected ResolverFactory $resolverFactory
protected Cache $cache

Methods

setEntityManager(EntityManagerInterface $entityManager)

No description

__construct(EntityManagerInterface $entityManager, Application $app, Repository $configRepository, ResolverFactory $resolverFactory)

No description

setCache(mixed $cache)

No description

Site[]
getByType(Type $type)

No description

Site|null
getByHandle(string $handle)

No description

Site|null
getDefault()

No description

add(Type $type, Theme $theme, string $handle, string $name, string $locale, bool $default = false)

No description

Tree|null
getSiteTreeByID(int $siteTreeID)

No description

Site|null
getByID(int $id)

No description

delete(Site $site)

No description

Site[]
getList(string $sort = 'name')

Returns a list of sites. If $sort = 'name' then the sites will be sorted by site name. If sort is false it will not be sorted. Only name is supported for now.

installDefault(string|null $locale = null)

No description

Site|null
getSite()

No description

Site|null
getActiveSiteForEditing()

No description

Details

setEntityManager(EntityManagerInterface $entityManager)

Parameters

EntityManagerInterface $entityManager

__construct(EntityManagerInterface $entityManager, Application $app, Repository $configRepository, ResolverFactory $resolverFactory)

Parameters

EntityManagerInterface $entityManager
Application $app
Repository $configRepository
ResolverFactory $resolverFactory

setCache(mixed $cache)

Parameters

mixed $cache

Site[] getByType(Type $type)

Parameters

Type $type

Return Value

Site[]

Site|null getByHandle(string $handle)

Parameters

string $handle

Return Value

Site|null

Site|null getDefault()

Return Value

Site|null

Site add(Type $type, Theme $theme, string $handle, string $name, string $locale, bool $default = false)

Parameters

Type $type
Theme $theme
string $handle
string $name
string $locale
bool $default

Return Value

Site

Tree|null getSiteTreeByID(int $siteTreeID)

Parameters

int $siteTreeID

Return Value

Tree|null

Site|null getByID(int $id)

Parameters

int $id

Return Value

Site|null

delete(Site $site)

Parameters

Site $site

Site[] getList(string $sort = 'name')

Returns a list of sites. If $sort = 'name' then the sites will be sorted by site name. If sort is false it will not be sorted. Only name is supported for now.

Parameters

string $sort

Return Value

Site[]

Site installDefault(string|null $locale = null)

Parameters

string|null $locale

Return Value

Site

final Site|null getSite()

Return Value

Site|null

final Site|null getActiveSiteForEditing()

Return Value

Site|null