Pipelines
What are the available pipelines?
| Pipeline |
Description |
\Aero\Store\Pipelines\ContentForBody |
Builds content string to be injected into the body of all pages. |
\Aero\Store\Pipelines\ContentForHead |
Builds content string to be injected into the head of all pages. |
\Aero\Store\Pipelines\RobotsTxt |
Used to defined/generate a robots.txt file. |
\Aero\Store\Pipelines\CartItemBuilder |
Run whenever a cart item is added to the cart in order to build the item from the request data. |
\Aero\Cart\Pipelines\OrderItemBuilder |
Run whenever a cart item is transformed into an order item. |
\Aero\Subscription\Pipelines\SubscriptionOrderBuilder |
Run when a subscription is processed and requires a new order to be created. |
\Aero\Admin\Pipelines\ListingRulesContextBuilder |
Builds listing rule context for each rule type. |
\Aero\Admin\Pipelines\ListingRulesDataFormatter |
Formats listing rules for admin UI. |
\Aero\Admin\Pipelines\PreviewMailAction |
Builds a temporary mail action to be previewed. |
\Aero\Admin\Reports\Pipelines\BuyXDiscountTierReportQuery |
Builds the query for the buy x discount tier report. |
\Aero\Admin\Reports\Pipelines\DiscountCodesReportQuery |
Builds the query for the discount codes report. |
\Aero\Admin\Reports\Pipelines\OrderBreakdownReportQuery |
Builds the query for the order breakdown report. |
\Aero\Admin\Reports\Pipelines\OrderSurchargeReportQuery |
Builds the query for the order surcharge report. |
\Aero\Admin\Reports\Pipelines\ProductStockLevelReportQuery |
Builds the query for the product stock level report. |
\Aero\Admin\Reports\Pipelines\RefundReportQuery |
Builds the query for the refund report. |
\Aero\Admin\Reports\Pipelines\SalesReportQuery |
Builds the query for the sales report. |
\Aero\Admin\Reports\Pipelines\VoucherReportQuery |
Builds the query for the voucher report. |
Aero\Admin\Configuration\Groups\PaymentAndShippingConfigurationGroup |
Builds the payment and shipping configuration group. |
Aero\Admin\Configuration\Groups\OrderManagementConfigurationGroup |
Builds the order management configuration group. |
Aero\Admin\Configuration\Groups\LocalizationConfigurationGroup |
Builds the localization configuration group. |
Aero\Admin\Configuration\Groups\ProductManagementConfigurationGroup |
Builds the product management configuration group. |
Aero\Admin\Configuration\Groups\NotificationsConfigurationGroup |
Builds the notifications configuration group. |
Aero\Admin\Configuration\Groups\TaxConfigurationGroup |
Builds the tax configuration group. |
Aero\Admin\Configuration\Groups\SystemConfigurationGroup |
Builds the system configuration group. |
Aero\Admin\Configuration\Groups\UserManagementConfigurationGroup |
Builds the user management configuration group. |
Aero\Admin\Configuration\Groups\MaintenanceConfigurationGroup |
Builds the maintenance configuration group. |
Aero\DataPort\Commands\Pipelines\ImportBlockCSVPipeline |
Creates a block from CSV data. |
Aero\DataPort\Commands\Pipelines\ImportProductCSVPipeline |
Creates a product from CSV data. |
\Aero\Store\Pipelines\ListingsPageQuery |
Builds the query for the listings page. |
Aero\Search\Elastic\Pipelines\ProductAttributes |
Builds the attributes for the ES Product model |
Aero\Search\Elastic\Pipelines\ListingAttributes |
Builds the attributes for the ES Listing model |
Aero\Search\Elastic\Pipelines\ListingCategory |
Builds listing documents categories data. |
Aero\Search\Elastic\Pipelines\ListingCategoryFacet |
Builds listing documents category string facet data. |
Aero\Search\Elastic\Pipelines\ListingManufacturerFacet |
Builds listing documents manufacturer string facet data. |
Aero\Search\Elastic\Pipelines\ListingTagFacet |
Builds listing documents tag string facet data. |
Aero\Search\Elastic\Pipelines\Mapping |
Used to build the ES Mapping for search documents. |
How do I extend pipelines?
The payload data can be altered using the extend() method. This is typically done from within a Service Provider:
- If the code is unique to a particular store it could be placed in the
boot()method of theAppServiceProvider. - If it is to be included as part of a module, then it can be added to the setup method of the module's Service Provider.
For example, if a module needs to add an option to items to flag them as requiring gift wrap, the CartItemBuilder pipeline class should be extended in the module's ServiceProvider as shown below:
<?php
namespace Aerocargo\Acme;
use Aero\Cart\CartItemOption;
use Aero\Common\Providers\ModuleServiceProvider;
use Aero\Store\Pipelines\CartItemBuilder;
class ServiceProvider extends ModuleServiceProvider
{
public function setup()
{
CartItemBuilder::extend(function ($item) {
if (request()->has('gift_wrap')) {
$option = CartItemOption::create('Gift wrap');
$item->addOption($option);
}
});
}
}