PHP Interface Newscoop\Service\IThemeManagementService

Inheritance: extends Newscoop\Service\IThemeService
Show file Open project: sourcefabric/newscoop

Public Methods

Method Description
assignArticleTypes ( $articleTypes, Theme $theme ) Assign the article types to the theme.
assignOutputSetting ( OutputSettings $outputSettings, Theme $theme ) Assign the output settings to the theme.
assignTheme ( Theme $theme, Publication $publication ) Assign the theme to the publication.
exportTheme ( Theme | integer $theme ) : the Export the theme.
findOutputSetting ( Theme $theme, Output $output ) : array Provides the output setting for the provided theme and ouput.
getOutputSettings ( Theme $theme ) : array Provides the all output setting found for the theme.
getTemplates ( Theme | string $theme ) : array Provides the all template resources (.tpl) files found for the theme.
getThemes ( Publication | integer $publication, SearchTheme $search = NULL, integer | 0 $offset, integer $limit ) : array Provides the themes that are assigned to the publication.
getUnassignedThemes ( SearchTheme $search = NULL, integer | 0 $offset, integer $limit ) : array Provides the themes that are unassigned to any publication.
installTheme ( str $filePath ) : boolean Updates the theme.
removeTheme ( Theme | integer $theme ) : boolean Delete the theme and all coresponding connections. Please check the isUsedTheme method from IOutputSettingIssueService before removing the theme.
updateTheme ( Theme $theme ) Updates the theme.

Method Details

assignArticleTypes() public method

Assign the article types to the theme.
public assignArticleTypes ( $articleTypes, Theme $theme )
$theme Newscoop\Entity\Theme The theme to be assigned to, not null.

assignOutputSetting() public method

Assign the output settings to the theme.
public assignOutputSetting ( OutputSettings $outputSettings, Theme $theme )
$outputSettings Newscoop\Entity\OutputSettings The output settings to be assigned to the theme.
$theme Newscoop\Entity\Theme The theme to be assigned to, not null.

assignTheme() public method

Assign the theme to the publication.
public assignTheme ( Theme $theme, Publication $publication )
$theme Newscoop\Entity\Theme The theme to be assigned, not null.
$publication Newscoop\Entity\Publication The publication to be assigned the theme for, not null.

exportTheme() public method

Export the theme.
public exportTheme ( Theme | integer $theme ) : the
$theme Newscoop\Entity\Theme | integer The theme or theme id to be exported, not null.
return the file name containing the exported archive.

findOutputSetting() public method

Provides the output setting for the provided theme and ouput.
public findOutputSetting ( Theme $theme, Output $output ) : array
$theme Newscoop\Entity\Theme The theme to retrieve the output setting for, not null.
$output Newscoop\Entity\Output The output, not null.
return array of Newscoop\Entity\OutputSettings The output setting, null if none found for the theme and output.

getOutputSettings() public method

Provides the all output setting found for the theme.
public getOutputSettings ( Theme $theme ) : array
$theme Newscoop\Entity\Theme The theme to retrieve the output setting for, not null.
return array of Newscoop\Entity\OutputSettings The array containing all the OutputSettings assigned to the provided theme, not null migh be empty.

getTemplates() public method

Provides the all template resources (.tpl) files found for the theme.
public getTemplates ( Theme | string $theme ) : array
$theme Newscoop\Entity\Theme | string The theme to retrieve the template resource for can be the Theme object or the theme path, not null.
return array of Newscoop\Entity\Resource The array containing all the template resources assigned to the provided theme, not null migh be empty.

getThemes() public method

Provides the themes that are assigned to the publication.
public getThemes ( Publication | integer $publication, SearchTheme $search = NULL, integer | 0 $offset, integer $limit ) : array
$publication Newscoop\Entity\Publication | integer The publication to retrieve the themes for or the publication id, not null.
$search Newscoop\Service\Model\SearchTheme The search criteria, not null.
$offset integer | 0
$limit integer The limit of entities to fetch, negaive value will fetch all entities found.
return array of Newscoop\Entity\Theme The array containing all the Themes assigned to the provided publication, not null migh be empty.

getUnassignedThemes() public method

Provides the themes that are unassigned to any publication.
public getUnassignedThemes ( SearchTheme $search = NULL, integer | 0 $offset, integer $limit ) : array
$search Newscoop\Service\Model\SearchTheme The search criteria, not null.
$offset integer | 0
$limit integer The limit of entities to fetch, negaive value will fetch all entities found.
return array of Newscoop\Entity\Theme The array containing all the unassigned Themes, not null migh be empty.

installTheme() public method

Updates the theme.
public installTheme ( str $filePath ) : boolean
$filePath str The file path to the zip containing the theme, not null.
return boolean True if the theme was succesfully added, false otherwise.

removeTheme() public method

Delete the theme and all coresponding connections. Please check the isUsedTheme method from IOutputSettingIssueService before removing the theme.
public removeTheme ( Theme | integer $theme ) : boolean
$theme Newscoop\Entity\Theme | integer The theme or theme id to be deleted, not null.
return boolean TRUE if the theme was succesfully deleted, FLASE if the theme is in use and cannot be removed.

updateTheme() public method

Updates the theme.
public updateTheme ( Theme $theme )
$theme Newscoop\Entity\Theme The theme to be updated, not null.