PHP Класс VersionPress\ChangeInfos\TrackedChangeInfo

VP-Action: post/edit/VPID123 Specific subclasses optionally add their own tags.
См. также: CommitMessage::getVersionPressTags()
См. также: UntrackedChangeInfo Changes created outside of VersionPress.
Наследование: implements VersionPress\ChangeInfos\ChangeInfo
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( $scope, $actionsInfo, $action, $id, $customTags = [], $customFiles = [] )
getAction ( ) : string The action done on the object type, for instance "install" or "activate" if the object was a plugin.
getChangeDescription ( ) : string Text displayed in the main VersionPress table (see admin/index.php). Also used to construct commit message subject (first line) when the commit is first physically created.
getChangedFiles ( ) : array Reports changes in files that relate to this ChangeInfo. Used by {@see Committer::stageRelatedFiles()}.
getCommitMessage ( )
getCustomTags ( ) : array Used to construct a commit message body, subclasses provide an array of VP tags using this method. If they don't need custom tags, they return an empty array.
getId ( )
getPriority ( )
getScope ( ) : string Object type, the first part of the VP-Action tag value.

Защищенные методы

Метод Описание
getActionTagValue ( ) : string Used to construct a commit message body, subclasses provide a string for the VP-Action tag value using this method.

Приватные методы

Метод Описание
getCommitMessageBody ( ) : string Constructs commit message body, which is typically a couple of lines of VP tags.

Описание методов

__construct() публичный Метод

public __construct ( $scope, $actionsInfo, $action, $id, $customTags = [], $customFiles = [] )

getAction() публичный Метод

Action is always part of VP-Action tag as the second segment.
public getAction ( ) : string
Результат string

getActionTagValue() защищенный Метод

Used to construct a commit message body, subclasses provide a string for the VP-Action tag value using this method.
См. также: getCommitMessageBody()
protected getActionTagValue ( ) : string
Результат string

getChangeDescription() публичный Метод

Text displayed in the main VersionPress table (see admin/index.php). Also used to construct commit message subject (first line) when the commit is first physically created.
public getChangeDescription ( ) : string
Результат string

getChangedFiles() публичный Метод

Path specifications are either pointers to storage files based on entity name and VPID or a concrete path (optionally with wildcards). An example: [ ['type' => 'storage-file', 'entity' => 'post', 'id' => VPID, 'parent-id' => null], ['type' => 'storage-file', 'entity' => 'usermeta', 'id' => VPID, 'parent-id' => user-VPID], ['type' => 'all-storage-files', 'entity' => 'option'], ['type' => 'path', 'path' => '/var/www/wp/example.txt'], ['type' => 'path', 'path' => '/var/www/wp/folder/*'] ]
public getChangedFiles ( ) : array
Результат array

getCommitMessage() публичный Метод

public getCommitMessage ( )

getCustomTags() публичный Метод

Used to construct a commit message body, subclasses provide an array of VP tags using this method. If they don't need custom tags, they return an empty array.
См. также: getCommitMessageBody()
public getCustomTags ( ) : array
Результат array

getId() публичный Метод

public getId ( )

getPriority() публичный Метод

public getPriority ( )

getScope() публичный Метод

For example, when objectType is "post", the VP-Action tag will be something like "post/edit/VPID123".
public getScope ( ) : string
Результат string