PHP Class VersionPress\Git\ChangeInfoPreprocessors\PostChangeInfoPreprocessor

Inheritance: implements VersionPress\Git\ChangeInfoPreprocessors\ChangeInfoPreprocessor
Datei anzeigen Open project: versionpress/versionpress

Public Methods

Method Description
__construct ( ChangeInfoFactory $changeInfoFactory )
process ( VersionPress\ChangeInfos\ChangeInfo[] $changeInfoList ) : VersionPress\ChangeInfos\ChangeInfo[][] If both 'post/draft' and 'post/publish' actions exist for the same entity, replace them with one 'post/create' action.

Private Methods

Method Description
getChangeInfosByIndicies ( VersionPress\ChangeInfos\ChangeInfo[] $changeInfoList, array $indicies ) : array Find all changeInfos and group them according to provided indicies in $changeInfoList by VPID
removeChangeInfos ( &$changeInfoList, $changeInfos ) Removes all changeInfos from source changeInfoList
replaceChangeInfosCombination ( &$changeInfoList, array $indicies, string $resultAction )

Method Details

__construct() public method

public __construct ( ChangeInfoFactory $changeInfoFactory )
$changeInfoFactory VersionPress\ChangeInfos\ChangeInfoFactory

process() public method

If both 'post/draft' and 'post/publish' actions exist for the same entity, replace them with one 'post/create' action.
public process ( VersionPress\ChangeInfos\ChangeInfo[] $changeInfoList ) : VersionPress\ChangeInfos\ChangeInfo[][]
$changeInfoList VersionPress\ChangeInfos\ChangeInfo[]
return VersionPress\ChangeInfos\ChangeInfo[][]