class ThemeRepository extends EntityRepository

Class ThemeRepository is injected as alligator.theme.repository service. ThemeRepository is used for crud operation for managed entity.

Use this class to work with database.

Constants

ALIAS

Alias for theme

Methods

save(Theme $theme)

Persist new theme

bool
deleteTheme(Theme $theme)

Delete theme

Theme|null
getThemeByName(string $name)

Find theme by name

Theme|null
getThemeById(int $id)

Find theme by id

Details

at line 37
Theme save(Theme $theme)

Persist new theme

Parameters

Theme $theme

Return Value

Theme

Exceptions

Exception

at line 58
bool deleteTheme(Theme $theme)

Delete theme

Parameters

Theme $theme

Return Value

bool

Exceptions

Exception

at line 79
Theme|null getThemeByName(string $name)

Find theme by name

Parameters

string $name

Return Value

Theme|null

Exceptions

NonUniqueResultException

at line 95
Theme|null getThemeById(int $id)

Find theme by id

Parameters

int $id

Return Value

Theme|null

Exceptions

NonUniqueResultException