本文整理汇总了PHP中Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider::copyId方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigProvider::copyId方法的具体用法?PHP ConfigProvider::copyId怎么用?PHP ConfigProvider::copyId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider
的用法示例。
在下文中一共展示了ConfigProvider::copyId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testConfig
public function testConfig()
{
$this->assertEquals($this->configManager, $this->configProvider->getConfigManager());
$this->assertEquals(true, $this->configProvider->hasConfig(DemoEntity::ENTITY_NAME));
$this->assertEquals($this->entityConfig, $this->configProvider->getConfig(DemoEntity::ENTITY_NAME));
$this->assertEquals('testScope', $this->configProvider->getScope());
$entityConfigId = new EntityConfigId(DemoEntity::ENTITY_NAME, 'testScope');
$fieldConfigId = new FieldConfigId(DemoEntity::ENTITY_NAME, 'testScope', 'testField', 'string');
$this->assertEquals($entityConfigId, $this->configProvider->getId(DemoEntity::ENTITY_NAME));
$this->assertEquals($fieldConfigId, $this->configProvider->getId(DemoEntity::ENTITY_NAME, 'testField', 'string'));
$entityConfigIdWithOtherScope = new EntityConfigId(DemoEntity::ENTITY_NAME, 'otherScope');
$fieldConfigIdWithOtherScope = new FieldConfigId(DemoEntity::ENTITY_NAME, 'otherScope', 'testField', 'string');
$this->assertEquals($entityConfigId, $this->configProvider->copyId($entityConfigIdWithOtherScope));
$this->assertEquals($fieldConfigId, $this->configProvider->copyId($fieldConfigIdWithOtherScope));
$this->assertEquals($this->entityConfig, $this->configProvider->getConfigById($entityConfigIdWithOtherScope));
}