Свойство |
Type |
Description |
|
$cleanCache |
|
|
|
$entityName |
string |
Name of the entity, e.g. 'post' or 'comment'. |
|
$hasNaturalVpid |
boolean |
If the entity has natural VPID, the $idColumnName and $vpidColumnName will point to the same column.
The opposite is $usesGeneratedVpids. |
|
$hasReferences |
boolean |
True if entity has references. Basically returns count($references) > 0. |
|
$idColumnName |
string |
Name of a column that uniquely identifies the entity within a db table. This is most
commonly an auto-increment primary key but not always - e.g., options use the 'option_name'
which is not a primary key in that table but is a local id as far as VersionPress is concerned. |
|
$mnReferences |
array |
The key is composed from table name and column in the junction table.
This kind of relationship has to be described in both entities.
Post:
array(
'term_taxonomy.term_taxonomy_id' => 'term_taxonomy',
)
Term taxonomy:
array(
'term_taxonomy.object_id' => 'post',
) |
|
$parentReference |
string |
If entity is child entity (meta, term_taxonomy etc.), this contains name of reference
to its parent. |
|
$references |
array |
array(
'post_author' => 'user',
'post_parent' => 'post'
)
If the entity doesn't have references, returns empty array. |
|
$storageClass |
|
|
|
$tableName |
string |
Name of DB table where the entity is stored. By default it's {@see entityName}. |
|
$usesGeneratedVpids |
boolean |
The opposite is $hasNaturalVpid. |
|
$valueReferences |
array |
The key consists of name of column, where reference source is stored with its value and column,
where is name of referenced entities.
array(
'meta_key=_thumbnail_id@meta_value' => 'post',
'meta_key=menu_object_item_id@meta_value' => 'post',
) |
|
$vpidColumnName |
string |
Name of a column that stores a globally unique VersionPress ID (VPID). For entities
that use auto-increment $idColumnName this will be 'vp_id' and VersionPress will generate
and maintain VPIDs for such entities. The opposite example is the options entity - the 'option_name'
column already identifies the option globally and uniquely so it can be this VPID column name directly. |
|