| @@ 22-34 (lines=13) @@ | ||
| 19 | * @param \samsoncms\api\generator\metadata\Virtual $metadata |
|
| 20 | * @param array $structureRow Entity database row |
|
| 21 | */ |
|
| 22 | public function analyzeEntityRecord(&$metadata, array $structureRow) |
|
| 23 | { |
|
| 24 | $metadata->structureRow = $structureRow; |
|
| 25 | ||
| 26 | // Get CapsCase and transliterated entity name |
|
| 27 | $metadata->entity = $this->entityName($structureRow['Name']); |
|
| 28 | $metadata->entityClassName = $this->fullEntityName($metadata->entity); |
|
| 29 | $metadata->entityRealName = $structureRow['Name']; |
|
| 30 | $metadata->entityID = $structureRow['StructureID']; |
|
| 31 | ||
| 32 | // Try to find entity parent identifier for building future relations |
|
| 33 | $metadata->parentID = $this->getParentEntity($structureRow['StructureID']); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * Virtual entity additional field analyzer. |
|
| @@ 118-130 (lines=13) @@ | ||
| 115 | * @param \samsoncms\api\generator\metadata\Virtual $metadata |
|
| 116 | * @param array $structureRow Entity database row |
|
| 117 | */ |
|
| 118 | public function analyzeEntityRecord(&$metadata, array $structureRow) |
|
| 119 | { |
|
| 120 | $metadata->structureRow = $structureRow; |
|
| 121 | ||
| 122 | // Get CapsCase and transliterated entity name |
|
| 123 | $metadata->entity = $this->entityName($structureRow['Name']); |
|
| 124 | $metadata->entityClassName = $this->fullEntityName($metadata->entity); |
|
| 125 | $metadata->entityRealName = $structureRow['Name']; |
|
| 126 | $metadata->entityID = $structureRow['StructureID']; |
|
| 127 | ||
| 128 | // Try to find entity parent identifier for building future relations |
|
| 129 | $metadata->parentID = $this->getParentEntity($structureRow['StructureID']); |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * Virtual entity additional field analyzer. |
|