本文整理汇总了PHP中WellCommerce\Component\DataSet\Configurator\DataSetConfiguratorInterface::setColumns方法的典型用法代码示例。如果您正苦于以下问题:PHP DataSetConfiguratorInterface::setColumns方法的具体用法?PHP DataSetConfiguratorInterface::setColumns怎么用?PHP DataSetConfiguratorInterface::setColumns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WellCommerce\Component\DataSet\Configurator\DataSetConfiguratorInterface
的用法示例。
在下文中一共展示了DataSetConfiguratorInterface::setColumns方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'producer.id', 'name' => 'producer_translation.name', 'route' => 'IDENTITY(producer_translation.route)', 'products' => 'COUNT(producer_products.id)']);
$configurator->setColumnTransformers(['route' => $this->getDataSetTransformer('route')]);
}
示例2: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'cart_product.id', 'price' => 'IF_ELSE(cart_product.attribute IS NOT NULL, product_attribute.sellPrice.grossAmount, product.sellPrice.grossAmount)', 'discountedPrice' => 'IF_ELSE(cart_product.attribute IS NOT NULL, product_attribute.sellPrice.discountedGrossAmount, product.sellPrice.discountedGrossAmount)', 'currency' => 'IF_ELSE(cart_product.attribute IS NOT NULL, product_attribute.sellPrice.currency, product.sellPrice.currency)', 'stock' => 'IF_ELSE(cart_product.attribute IS NOT NULL, product_attribute.stock, product.stock)', 'weight' => 'IF_ELSE(cart_product.attribute IS NOT NULL, product_attribute.weight, product.weight)', 'quantity' => 'cart_product.quantity', 'attribute' => 'IDENTITY(cart_product.attribute)', 'name' => 'product_translation.name', 'route' => 'IDENTITY(product_translation.route)', 'isDiscountValid' => 'IF_ELSE(:date BETWEEN product.sellPrice.validFrom AND product.sellPrice.validTo, 1, 0)', 'tax' => 'sell_tax.value', 'photo' => 'photos.path']);
$configurator->setColumnTransformers(['route' => $this->getDataSetTransformer('route')]);
}
示例3: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'client_group.id', 'name' => 'client_group_translation.name', 'totalClients' => 'COUNT(client)']);
}
示例4: configureOptions
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'order_product.id', 'price' => 'IF_ELSE(order_product.variant IS NOT NULL, product_variant.sellPrice.grossAmount, product.sellPrice.grossAmount)', 'discountedPrice' => 'IF_ELSE(order_product.variant IS NOT NULL, product_variant.sellPrice.discountedGrossAmount, product.sellPrice.discountedGrossAmount)', 'currency' => 'IF_ELSE(order_product.variant IS NOT NULL, product_variant.sellPrice.currency, product.sellPrice.currency)', 'stock' => 'IF_ELSE(order_product.variant IS NOT NULL, product_variant.stock, product.stock)', 'weight' => 'IF_ELSE(order_product.variant IS NOT NULL, product_variant.weight, product.weight)', 'quantity' => 'order_product.quantity', 'variant' => 'IDENTITY(order_product.variant)', 'options' => 'order_product.options', 'name' => 'product_translation.name', 'route' => 'IDENTITY(product_translation.route)', 'isDiscountValid' => 'IF_ELSE(:date BETWEEN product.sellPrice.validFrom AND product.sellPrice.validTo, 1, 0)', 'tax' => 'sell_tax.value', 'photo' => 'photos.path']);
$configurator->setColumnTransformers(['route' => $this->getDataSetTransformer('route')]);
$configurator->setCacheOptions(new CacheOptions(true, 3600, [Order::class, OrderProduct::class, Product::class, Variant::class, Tax::class]));
}
示例5: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'package.id', 'name' => 'package.name', 'fullName' => 'package.fullName', 'vendor' => 'package.vendor', 'localVersion' => 'package.localVersion', 'remoteVersion' => 'package.remoteVersion', 'createdAt' => 'package.createdAt', 'updatedAt' => 'package.updatedAt']);
$configurator->setColumnTransformers(['createdAt' => $this->getDataSetTransformer('date', ['format' => 'Y-m-d H:i:s']), 'updatedAt' => $this->getDataSetTransformer('date', ['format' => 'Y-m-d H:i:s']), 'localVersion' => $this->getDataSetTransformer('package_version_reference'), 'remoteVersion' => $this->getDataSetTransformer('package_version_reference')]);
}
示例6: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'attribute.id', 'name' => 'attribute_translation.name', 'groups' => 'GROUP_CONCAT(DISTINCT attribute_groups_translation.name ORDER BY attribute_groups_translation.name ASC SEPARATOR \', \')']);
}
示例7: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'layout_box.id', 'name' => 'layout_box_translation.name', 'identifier' => 'layout_box.identifier', 'boxType' => 'layout_box.boxType']);
}
示例8: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'review.id', 'nick' => 'review.nick', 'rating' => 'review.rating', 'createdAt' => 'review.createdAt', 'product' => 'product_translation.name']);
$configurator->setColumnTransformers(['createdAt' => $this->getDataSetTransformer('date', ['format' => 'Y-m-d H:i:s'])]);
}
示例9: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'user.id', 'username' => 'user.username', 'name' => 'CONCAT(user.firstName,\' \', user.lastName)', 'first_name' => 'user.firstName', 'last_name' => 'user.lastName', 'email' => 'user.email', 'enabled' => 'user.enabled']);
}
示例10: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'company.id', 'name' => 'company.name', 'shortName' => 'company.shortName', 'createdAt' => 'company.createdAt']);
$configurator->setColumnTransformers(['createdAt' => $this->getDataSetTransformer('date', ['format' => 'Y-m-d H:i:s'])]);
}
示例11: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns([]);
}
示例12: configureOptions
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'category.id', 'hierarchy' => 'category.hierarchy', 'enabled' => 'category.enabled', 'parent' => 'IDENTITY(category.parent)', 'children_count' => 'category.childrenCount', 'products_count' => 'category.productsCount', 'name' => 'category_translation.name', 'slug' => 'category_translation.slug', 'shop' => 'category_shops.id', 'route' => 'IDENTITY(category_translation.route)']);
$configurator->setColumnTransformers(['route' => $this->getDataSetTransformer('route')]);
$configurator->setCacheOptions(new CacheOptions(true, 3600, [Category::class, CategoryInterface::class, CategoryTranslation::class]));
}
示例13: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'channel.id', 'name' => 'channel.name', 'url' => 'channel.url', 'createdAt' => 'channel.createdAt', 'updatedAt' => 'channel.updatedAt']);
$configurator->setColumnTransformers(['createdAt' => $this->getDataSetTransformer('date', ['format' => 'Y-m-d H:i:s']), 'updatedAt' => $this->getDataSetTransformer('date', ['format' => 'Y-m-d H:i:s'])]);
}
示例14: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'category.id', 'hierarchy' => 'category.hierarchy', 'enabled' => 'category.enabled', 'parent' => 'IDENTITY(category.parent)', 'children' => 'COUNT(category_children.id)', 'products' => 'COUNT(category_products.id)', 'name' => 'category_translation.name', 'slug' => 'category_translation.slug', 'shop' => 'category_shops.id', 'route' => 'IDENTITY(category_translation.route)']);
}
示例15: configureOptions
/**
* {@inheritdoc}
*/
public function configureOptions(DataSetConfiguratorInterface $configurator)
{
$configurator->setColumns(['id' => 'shop.id', 'name' => 'shop.name', 'url' => 'shop.url', 'theme' => 'shop_theme.name', 'company' => 'shop_company.name', 'currency' => 'shop.defaultCurrency', 'country' => 'shop.defaultCountry']);
}