PHP 클래스 Newscoop\Service\Implementation\ThemeManagementServiceLocal

The implementation relays on the local structure, this means that this service will use also the file system and Doctrine for synchronizing with the database.
상속: extends ThemeServiceLocalFileSystem, implements Newscoop\Service\IThemeManagementService
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$articleTypeService Newscoop\Service\IArticleTypeService
$em Doctrine\ORM\EntityManager
$outputService Newscoop\Service\IOutputService
$outputSettingIssueService Newscoop\Service\IOutputSettingIssueService
$syncResourceService Newscoop\Service\ISyncResourceService

공개 메소드들

메소드 설명
assignArticleTypes ( $articleTypes, Theme $theme ) : string Adds new mapping in the theme xml
assignOutputSetting ( OutputSettings $outputSettings, Theme $theme )
assignTheme ( Theme $theme, Publication $publication, $cli = false )
copyToUnassigned ( Theme $theme )
exportTheme ( $theme, $p_errorMsg = '' ) * ---------------------------------------------------------------
findOutputSetting ( Theme $theme, Output $output )
getArticleTypeService ( ) : Newscoop\Service\IArticleTypeService Provides the article type service.
getArticleTypes ( Theme $theme ) : object
getCountThemes ( $publication, SearchTheme $search = NULL )
getCountUnassignedThemes ( Search $search = NULL ) : integer Provides the count of the entities that can be associated with the provided search.
getOutputSettings ( Theme $theme )
getTemplates ( $theme )
getThemePublication ( Theme $theme, Output $output = null ) : Publication Get the publication of a theme, and optionally output
getThemes ( $publication, SearchTheme $search = NULL, $offset, $limit )
getUnassignedThemes ( SearchTheme $search = NULL, $offset, $limit )
installTheme ( $filePath )
removeTheme ( $theme )
updateTheme ( Theme $theme )

보호된 메소드들

메소드 설명
copy ( string $src, string $dst ) Copies recursivelly the folder content from src to destination.
filterThemesConfigPathsInSameFolder ( string $config, array $allConfigs ) : array Filter from the provided configs array all the configs that are located under the same folder.
getManager ( ) : Doctrine\ORM\EntityManager Provides the dictrine entity manager.
getNewThemeFolder ( str $inFolder ) : str Provides a new folder (Automatically created) to place a new theme.
getOutputService ( ) : Newscoop\Service\IOutputService Provides the ouput service.
getOutputSettingIssueService ( ) : Newscoop\Service\IOutputSettingIssueService Provides the Output setting issue service.
getRelativePath ( Resource $rsc, string $themePath ) : string Provides the relative path of the resource based on the provided theme path.
getSyncResourceService ( ) : Newscoop\Service\ISyncResourceService Provides the sync resource service.
loadOutputResource ( SimpleXMLElement $parent, string $tagName, string $themePath ) : Resource Reads the resources from an output tag.
loadOutputSetting ( SimpleXMLElement $nodeOutput, string $themePath ) : OutputSettings Load the output setting from the provided xml node.
loadOutputSettings ( string $themePath ) : array Load all the output settings from the specified path.
rrmdir ( string $dir ) Deletes recursivelly the folder content from dir.
syncOutputSettings ( OutputSettings $to, OutputSettings $from ) Copies from the from output settings to the to output settings all the pages (front, article .

비공개 메소드들

메소드 설명
getThemesData ( $publication, SearchTheme $search = NULL )
getUnassignedThemesData ( SearchTheme $search = NULL ) * ---------------------------------------------------------------

메소드 상세

assignArticleTypes() 공개 메소드

Adds new mapping in the theme xml
public assignArticleTypes ( $articleTypes, Theme $theme ) : string
$articleTypes an array of mapping new values to old ones [ oldTypeName => [ name : newTypeName, ignore : boolean, fields' : [ OldFieldName : [ name : new/oldType, parentType : existingSysType, ignore : boolean ], [...] ] ] , [...] ] parentType => existingSysType will be used for getting it's other props from db
$theme Newscoop\Entity\Theme
리턴 string the generated xml

assignOutputSetting() 공개 메소드

public assignOutputSetting ( OutputSettings $outputSettings, Theme $theme )
$outputSettings Newscoop\Entity\OutputSettings
$theme Newscoop\Entity\Theme

assignTheme() 공개 메소드

public assignTheme ( Theme $theme, Publication $publication, $cli = false )
$theme Newscoop\Entity\Theme
$publication Newscoop\Entity\Publication

copy() 보호된 메소드

Copies recursivelly the folder content from src to destination.
protected copy ( string $src, string $dst )
$src string The source folder, *(not null not empty).
$dst string the destination folder, *(not null not empty).

copyToUnassigned() 공개 메소드

public copyToUnassigned ( Theme $theme )
$theme Newscoop\Entity\Theme

exportTheme() 공개 메소드

* ---------------------------------------------------------------
public exportTheme ( $theme, $p_errorMsg = '' )

filterThemesConfigPathsInSameFolder() 보호된 메소드

For instance if the config is in a publication folder than this method will return all the configs for that publicatio.
protected filterThemesConfigPathsInSameFolder ( string $config, array $allConfigs ) : array
$config string The config path to be searched for, not null.
$allConfigs array
리턴 array The array containing as key the id of the theme config (index) and as a value the relative path of the theme configuration XML file for all configurations that are iun the same folder, not null can be empty.

findOutputSetting() 공개 메소드

public findOutputSetting ( Theme $theme, Output $output )
$theme Newscoop\Entity\Theme
$output Newscoop\Entity\Output

getArticleTypeService() 공개 메소드

Provides the article type service.
public getArticleTypeService ( ) : Newscoop\Service\IArticleTypeService
리턴 Newscoop\Service\IArticleTypeService

getArticleTypes() 공개 메소드

저자: mihaibalaceanu
public getArticleTypes ( Theme $theme ) : object
$theme Newscoop\Entity\Theme
리턴 object

getCountThemes() 공개 메소드

public getCountThemes ( $publication, SearchTheme $search = NULL )
$search Newscoop\Service\Model\SearchTheme

getCountUnassignedThemes() 공개 메소드

Provides the count of the entities that can be associated with the provided search.
public getCountUnassignedThemes ( Search $search = NULL ) : integer
$search Newscoop\Service\Model\Search\Search The search criteria, not null.
리턴 integer The entities count.

getManager() 보호된 메소드

Provides the dictrine entity manager.
protected getManager ( ) : Doctrine\ORM\EntityManager
리턴 Doctrine\ORM\EntityManager The doctrine entity manager.

getNewThemeFolder() 보호된 메소드

Provides a new folder (Automatically created) to place a new theme.
protected getNewThemeFolder ( str $inFolder ) : str
$inFolder str The folder wehere to place the new theme folder, this has to be relative to the themes folder.
리턴 str The relative theme path.

getOutputService() 보호된 메소드

Provides the ouput service.
protected getOutputService ( ) : Newscoop\Service\IOutputService
리턴 Newscoop\Service\IOutputService The service service to be used.

getOutputSettingIssueService() 보호된 메소드

Provides the Output setting issue service.
protected getOutputSettingIssueService ( ) : Newscoop\Service\IOutputSettingIssueService
리턴 Newscoop\Service\IOutputSettingIssueService The output setting issue service to be used by this controller.

getOutputSettings() 공개 메소드

public getOutputSettings ( Theme $theme )
$theme Newscoop\Entity\Theme

getRelativePath() 보호된 메소드

This method also checks if the resource path is compatible with the theme path meaning that the resource needs to be placed in the theme.
protected getRelativePath ( Resource $rsc, string $themePath ) : string
$rsc Newscoop\Entity\Resource The resource to extract the relative path from, not null.
$themePath string The theme path, not null.
리턴 string The relative [path in regards with the theme path for the resource.

getSyncResourceService() 보호된 메소드

Provides the sync resource service.
protected getSyncResourceService ( ) : Newscoop\Service\ISyncResourceService
리턴 Newscoop\Service\ISyncResourceService The sync resource service to be used.

getTemplates() 공개 메소드

public getTemplates ( $theme )

getThemePublication() 공개 메소드

Get the publication of a theme, and optionally output
public getThemePublication ( Theme $theme, Output $output = null ) : Publication
$theme Newscoop\Entity\Theme
$output Newscoop\Entity\Output
리턴 Newscoop\Entity\Publication

getThemes() 공개 메소드

public getThemes ( $publication, SearchTheme $search = NULL, $offset, $limit )
$search Newscoop\Service\Model\SearchTheme

getUnassignedThemes() 공개 메소드

public getUnassignedThemes ( SearchTheme $search = NULL, $offset, $limit )
$search Newscoop\Service\Model\SearchTheme

installTheme() 공개 메소드

public installTheme ( $filePath )

loadOutputResource() 보호된 메소드

Reads the resources from an output tag.
protected loadOutputResource ( SimpleXMLElement $parent, string $tagName, string $themePath ) : Resource
$parent SimpleXMLElement The parent output node to read the resources from, *(not null not empty).
$tagName string The tag name containing the resource, *(not null not empty).
$themePath string The theme path to construct the resource path based on, *(not null not empty).
리턴 Newscoop\Entity\Resource The obtained resource, not null.

loadOutputSetting() 보호된 메소드

Load the output setting from the provided xml node.
protected loadOutputSetting ( SimpleXMLElement $nodeOutput, string $themePath ) : OutputSettings
$nodeOutput SimpleXMLElement The node from which to load, *(not null not empty).
$themePath string The theme path to construct the resource path based on, *(not null not empty).
리턴 Newscoop\Entity\OutputSettings The loaded output setting, not null.

loadOutputSettings() 보호된 메소드

Load all the output settings from the specified path.
protected loadOutputSettings ( string $themePath ) : array
$themePath string The theme path from where to load the output settings, *(not null not empty).
리턴 array The array containing all the found output settings, not null.

removeTheme() 공개 메소드

public removeTheme ( $theme )

rrmdir() 보호된 메소드

Deletes recursivelly the folder content from dir.
protected rrmdir ( string $dir )
$dir string The floder to be deleted, *(not null not empty).

syncOutputSettings() 보호된 메소드

..).
protected syncOutputSettings ( OutputSettings $to, OutputSettings $from )
$to Newscoop\Entity\OutputSettings The output setting to copy to, *(not null not empty).
$from Newscoop\Entity\OutputSettings The output setting to copy from, *(not null not empty).

updateTheme() 공개 메소드

public updateTheme ( Theme $theme )
$theme Newscoop\Entity\Theme

프로퍼티 상세

$articleTypeService 보호되어 있는 프로퍼티

protected IArticleTypeService,Newscoop\Service $articleTypeService
리턴 Newscoop\Service\IArticleTypeService

$em 보호되어 있는 프로퍼티

protected Doctrine\ORM\EntityManager $em
리턴 Doctrine\ORM\EntityManager

$outputService 보호되어 있는 프로퍼티

protected IOutputService,Newscoop\Service $outputService
리턴 Newscoop\Service\IOutputService

$outputSettingIssueService 보호되어 있는 프로퍼티

protected IOutputSettingIssueService,Newscoop\Service $outputSettingIssueService
리턴 Newscoop\Service\IOutputSettingIssueService

$syncResourceService 보호되어 있는 프로퍼티

protected ISyncResourceService,Newscoop\Service $syncResourceService
리턴 Newscoop\Service\ISyncResourceService