本文整理汇总了PHP中Sylius\Component\Resource\Metadata\MetadataInterface::getWrappedObject方法的典型用法代码示例。如果您正苦于以下问题:PHP MetadataInterface::getWrappedObject方法的具体用法?PHP MetadataInterface::getWrappedObject怎么用?PHP MetadataInterface::getWrappedObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sylius\Component\Resource\Metadata\MetadataInterface
的用法示例。
在下文中一共展示了MetadataInterface::getWrappedObject方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ResourceGridView
function it_uses_data_provider_to_create_a_view_with_data_and_definition(DataProviderInterface $dataProvider, ParametersParserInterface $parametersParser, Grid $grid, Parameters $parameters, MetadataInterface $resourceMetadata, Request $request, RequestConfiguration $requestConfiguration)
{
$expectedResourceGridView = new ResourceGridView(['foo', 'bar'], $grid->getWrappedObject(), $parameters->getWrappedObject(), $resourceMetadata->getWrappedObject(), $requestConfiguration->getWrappedObject());
$requestConfiguration->getRequest()->willReturn($request);
$parametersParser->parseRequestValues(['repository' => ['method' => 'createByCustomerQueryBuilder', 'arguments' => ['$customerId']]], $request)->willReturn(['repository' => ['method' => 'createByCustomerQueryBuilder', 'arguments' => [5]]]);
$grid->getDriverConfiguration()->willReturn(['repository' => ['method' => 'createByCustomerQueryBuilder', 'arguments' => ['$customerId']]]);
$grid->setDriverConfiguration(['repository' => ['method' => 'createByCustomerQueryBuilder', 'arguments' => [5]]])->shouldBeCalled();
$dataProvider->getData($grid, $parameters)->willReturn(['foo', 'bar']);
$this->create($grid, $parameters, $resourceMetadata, $requestConfiguration)->shouldBeSameResourceGridViewAs($expectedResourceGridView);
}
示例2: ResourceGridView
function it_uses_data_provider_to_create_a_view_with_data_and_definition(DataProviderInterface $dataProvider, Grid $grid, Parameters $parameters, MetadataInterface $resourceMetadata, RequestConfiguration $requestConfiguration)
{
$expectedResourceGridView = new ResourceGridView(['foo', 'bar'], $grid->getWrappedObject(), $parameters->getWrappedObject(), $resourceMetadata->getWrappedObject(), $requestConfiguration->getWrappedObject());
$dataProvider->getData($grid, $parameters)->willReturn(['foo', 'bar']);
$this->create($grid, $parameters, $resourceMetadata, $requestConfiguration)->shouldBeSameResourceGridViewAs($expectedResourceGridView);
}