VersionPress\Storages\MetaEntityStorage::loadEntity PHP Method

loadEntity() public method

public loadEntity ( $id, $parentId )
    public function loadEntity($id, $parentId)
    {
        $parent = $this->parentStorage->loadEntity($parentId, null);
        return $this->extractEntityFromParentByVpId($parent, $id);
    }

Usage Example

コード例 #1
0
 /**
  * @test
  */
 public function savedMetaEntityEqualsLoadedMetaEntity()
 {
     $this->parentStorage->save($this->testingParentEntity);
     $this->storage->save($this->testingMetaEntity);
     $loadedMetaEntity = $this->storage->loadEntity($this->testingMetaEntity['vp_id'], $this->testingParentEntity['vp_id']);
     $this->assertEquals($this->testingMetaEntity, $loadedMetaEntity);
 }