Light API 0.4.0 is a public beta: a minor release such as 0.5.0 may still break. What that means for your module
Light
Developer guideReference

API reference

Every @api type with its members, generated by the doctor.

Mrx\Catalog\Api\ProductPageContextInterface

Interface. Lets a card in the product editor's slots read the product the page shows. It resolves to the page's own view model, so the card sees the same loaded instance without a second load. The slots print only in the default-language view, so a card always gets the store 0 product, or null on "Add product".

KindMember
methodgetProduct(): ?Magento\Catalog\Api\Data\ProductInterface

Mrx\Customers\Api\CustomerNotesInterface

Interface.

KindMember
constMAX_LENGTH = 5000
constEMAIL_WELCOME = "email_welcome"
constEMAIL_CONFIRMATION = "email_confirm"
constEMAIL_PASSWORD_RESET = "email_reset"
methodgetNote(int $customerId): ?array
methodsaveNote(int $customerId, string $body, ?int $adminUserId): void
methodaddComment(int $customerId, string $body, ?int $adminUserId): int
methoddeleteComment(int $customerId, int $commentId): bool
methodgetComments(int $customerId, int $limit = 100): array
methodaddMarketingChange(int $customerId, string $status): void
methodgetMarketingChanges(int $customerId, int $limit = 50): array
methodaddEmailEvent(int $customerId, string $type, string $recipient, ?int $adminUserId): void
methodgetEmailEvents(int $customerId, int $limit = 50): array

Mrx\Customers\Api\CustomerPageContextInterface

Interface. The customer shown on the Light customer page. A card in mrx.customer.main.bottom or mrx.customer.aside.bottom asks for this interface and gets the page's own view model, so it reads the same customer without loading it again.

KindMember
methodgetCustomer(): ?Magento\Customer\Api\Data\CustomerInterface

Mrx\Customers\Api\TimelineProviderInterface

Interface. Adds computed events to the customer timeline. Register it in etc/adminhtml/di.xml, Mrx\Customers\Model\Timeline argument "providers". Mark it #[RequiresModule(...)] when it belongs to an extension that can be switched off, and register it as its \Proxy when its constructor needs that extension's classes. The customer arrives as the argument: do not inject CustomerPageContextInterface here or in services this provider builds.

KindMember
methodgetEvents(Magento\Customer\Api\Data\CustomerInterface $customer): array

Mrx\Documents\Api\Data\Document

Class.

KindMember
property$storeId: int readonly
property$title: string readonly
property$number: string readonly
property$date: string readonly
property$data: array readonly
method__construct(int $storeId, string $title, string $number, string $date, array $data)

Mrx\Documents\Api\DocumentRendererInterface

Interface. Prints documents of one type from the "documents" pool as one PDF, each in its own store view's language and the owner's format.

KindMember
methodrender(string $type, array $ids): string
methodrenderDocuments(string $type, array $documents): string

Mrx\Documents\Api\DocumentSectionInterface

Interface. A block added to documents of other modules, registered in the "document_sections" pool of Mrx\Documents\Model\Pdf\Sections as {section: object, document: type code or "", position: after_parties, after_items or after_totals, sort_order?, module?}. It renders in the frontend area of the document's store view. "" includes staff documents such as the picklist, whose number is the moment it was printed and whose language is the admin's; a section meant for customers names its types.

KindMember
methodrender(Mrx\Documents\Api\Data\Document $document, Magento\Framework\View\LayoutInterface $layout): string

Mrx\Documents\Api\DocumentTypeInterface

Interface. A PDF document type in the "documents" pool of Mrx\Documents\Model\Pdf\DocumentTypes. The type writes only the body: its template fills the doc-parties, doc-items, doc-totals and doc-note blocks, and Light adds the letterhead, footer and page numbers in the owner's format.

KindMember
methodgetLabel(): string
methodgetAclResource(): string
methodgetTemplate(): string
methodgetData(array $ids): array
methodgetFilename(array $ids): string

Mrx\Documents\Api\ItemLineInterface

Interface. Turns one item of an invoice, credit memo, shipment or order into the rows a PDF table shows. Registered in the "item_lines" pool of Mrx\Documents\Model\Pdf\ItemLines, keyed by product type; "default" serves every type without its own line.

KindMember
methodgetLines(Magento\Framework\DataObject $item): array

Mrx\Documents\Api\PdfRendererInterface

Interface. Turns one HTML document into PDF bytes. Light's default uses dompdf; a shop that runs Gotenberg or mPDF can set a preference. The HTML holds its own CSS; fonts are declared with @font-face and file:// URLs.

KindMember
methodrender(string $html, array $options = []): string

Mrx\Documents\Api\PickLocationInterface

Interface. Where products are stored, for the picklist's Bin column and sort. Registered in the "pick_locations" pool of Mrx\Documents\Model\Pdf\PickLocations; later items win for a SKU both know.

KindMember
methodgetLocations(array $skus, int $storeId): array

Mrx\Home\Api\ChannelAwareCounterInterface

Interface. A "Things to do" counter that can narrow its count to the channel Home is filtered on. Counters that only implement CounterInterface count install-wide work (it is not tied to a channel) and keep their count under a channel filter.

KindMember
methodgetCount(?Mrx\Light\Model\Channel\Channel $channel = null): int

Mrx\Home\Api\CounterInterface

Interface.

KindMember
methodgetCount(): int

Mrx\Home\Api\SetupCheckInterface

Interface.

KindMember
methodisComplete(): bool

Mrx\Home\Api\SetupDescriptionInterface

Interface. A setup step whose description depends on the store, such as the names of the installed payment providers. Registered as "description_provider" of the step's item in the pool setup_steps; the item's own "description" stays the text for when this returns ''.

KindMember
methodgetDescription(): string

Mrx\Light\Api\AdvancedUrlInterface

Interface. Links to a stock screen in the advanced view (spec section 7). In simple mode a stock screen that a Light page replaces sends the admin to that page; PARAM keeps the stock screen open until the admin opens a Light page again. Admin area only: the preference lives in etc/adminhtml/di.xml.

KindMember
constPARAM = "mrx_stock"
methodget(string $route, array $params = []): string

Mrx\Light\Api\AdvancedView\BackLinkProviderInterface

Interface. Decides the "Back to …" link of the advanced-view banner on stock screens a module owns.

KindMember
methodgetBackLink(string $fullActionName): ?array

Mrx\Light\Api\Branding\Brand

Class. The brand the admin shows (spec 13.2). The view file ids of the brand pool are resolved to URLs, and a field the brand leaves out is ''. label, shortName and loginTagline hold the registered English: templates translate them.

KindMember
property$code: string readonly
property$label: string readonly
property$shortName: string readonly
property$logoOnLight: string readonly
property$logoOnDark: string readonly
property$loginLockup: string readonly
property$loginLockupOnDark: string readonly
property$loginTagline: string readonly
property$favicon: string readonly
property$faviconType: string readonly
property$defaultTheme: array readonly
property$logoLockupOnDark: string readonly
method__construct(string $code, string $label, string $shortName, string $logoOnLight, string $logoOnDark, string $loginLockup, string $loginLockupOnDark, string $loginTagline, string $favicon, string $faviconType, array $defaultTheme, string $logoLockupOnDark = "")

Mrx\Light\Api\Branding\BrandInterface

Interface. The brand the admin shows: the entry of the brand pool with the highest priority that fits this platform and whose module is enabled (spec 13.2 and 13.3). Brands register in the admin area, so elsewhere this is the platform's name without logo files.

KindMember
methodget(): Mrx\Light\Api\Branding\Brand

Mrx\Light\Api\ExtensionApi

Class. The version of the Light extension API (spec section 8). Additions raise the minor version, removals and renames the major version. The API stays 0.x through the public beta that 0.1.0 launched; below 1.0.0 a caret range such as ^0.1 pins the minor, so a minor release may break. A module states its range in composer.json "extra.mrx-light-api".

KindMember
constVERSION
method staticsatisfies(string $constraint): bool

Mrx\Light\Api\FormOfAddressInterface

Interface. How a store view addresses its customers: informal ("je", "du") or formal ("u", "Sie"). Only the languages in the locales pool have two forms. Customer text in those languages loads i18n/<locale>.<form>.csv of every module on top of the language pack; admin text stays informal.

KindMember
constINFORMAL = "informal"
constFORMAL = "formal"
constXML_PATH = "mrx_light/locale/form_of_address"
methodforStore(int $storeId): ?string

Mrx\Light\Api\Form\AppliesToEntityInterface

Interface. Optional, next to FormExtensionInterface: sets values on the entity, so the entity's own save stores them once and REST, import and the advanced view see them (spec 6.2).

KindMember
methodapply(Mrx\Light\Api\Form\FormContextInterface $context, array $input, object $entity): void

Mrx\Light\Api\Form\CurrentFormInterface

Interface. The form the page shows. The editor's controller sets it before the page renders; cards read it. Null on a page that is no editor.

KindMember
methodget(): ?Mrx\Light\Api\Form\FormContextInterface

Mrx\Light\Api\Form\DeclaresFieldsInterface

Interface. Optional, next to FormExtensionInterface: Light draws the card from these fields (Mrx\Light\Block\Form\ExtensionCard) and checks the required ones before validate() runs (spec 6.2). A type this Light version doesn't know renders as text, so a module written for a later minor still works.

KindMember
methodgetFields(Mrx\Light\Api\Form\FormContextInterface $context): array

Mrx\Light\Api\Form\FormContextInterface

Interface. The editor a form extension works in (spec 6.2): which form, which entity and which store view.

KindMember
methodgetFormCode(): string
methodgetEntityId(): ?int
methodgetEntity(): ?object
methodgetStoreId(): int

Mrx\Light\Api\Form\FormExtensionInterface

Interface. Adds fields to a Light editor and saves them with it (spec 6.2). Register it in the form_extensions pool of Mrx\Light\Model\Form\ExtensionPool under the form code and your extension code; the form posts your fields as ext[][], and you only receive your own namespace. Give the class #[RequiresModule] and register its Proxy, as in every object pool.

KindMember
methodload(Mrx\Light\Api\Form\FormContextInterface $context): array
methodvalidate(Mrx\Light\Api\Form\FormContextInterface $context, array $input): array
methodsave(Mrx\Light\Api\Form\FormContextInterface $context, array $input): ?array

Mrx\Light\Api\IndexTable\ChannelFilterAwareInterface

Interface. Marks a provider that can filter its rows by channel (website). On a multi-channel install the table shows an "All channels / {channel}" select, keeps it in the page URL as ?channel=ID and passes the validated website id as Query::getChannelId() (also $query->filters['channel']).

KindMember
constFILTER_KEY = "channel"

Mrx\Light\Api\IndexTable\FilterableProviderInterface

Interface.

KindMember
methodgetFilterKeys(): array

Mrx\Light\Api\IndexTable\ProviderExtensionInterface

Interface. Adds columns and bulk actions to another module's table (registered in Mrx\Light\Model\IndexTable\ExtensionPool).

KindMember
methodgetColumns(): array
methodgetBulkActions(): array
methoddecorateRows(array $rows, Mrx\Light\Model\IndexTable\Query $query): array

Mrx\Light\Api\IndexTable\ProviderInterface

Interface.

KindMember
constTYPE_TEXT = "text"
constTYPE_LINK = "link"
constTYPE_BADGE = "badge"
constTYPE_MONEY = "money"
constTYPE_DATE = "date"
constTYPE_THUMBNAIL = "thumbnail"
constTYPE_NUMBER = "number"
constTYPE_TAGS = "tags"
constTYPE_CHANNEL = "channel"
constTYPE_LANGUAGE = "language"
methodgetAclResource(): string
methodgetColumns(): array
methodgetTabs(): array
methodgetDefaultSort(): array
methodgetSearchPlaceholder(): string
methodgetBulkActions(): array
methodgetEmptyState(): array
methodgetRows(Mrx\Light\Model\IndexTable\Query $query): array

Mrx\Light\Api\IndexTable\RowActionsInterface

Interface. A "More actions" menu at the end of each row. Implement it on a table provider, or on a ProviderExtensionInterface to add actions to another module's table; an extension's keys then start with "_".

KindMember
methodgetRowActions(): array

Mrx\Light\Api\ModeInterface

Interface. The admin's interface mode (spec section 7). Admin area only: the preference lives in etc/adminhtml/di.xml, so a storefront, cron or CLI class can't inject it.

KindMember
constSIMPLE = "simple"
constADVANCED = "advanced"
methodget(): string
methodisSimple(): bool
methodisStockView(): bool
methodshowsLight(): bool

Mrx\Light\Api\Navigation\Badge

Class. One count, shown on a nav item, a pin, a palette entry and a Home to-do. It has no URL: a cached URL would carry one admin's secret key, so every place that shows a count links to its own target.

KindMember
constTONES[] = "critical"
constTONES[] = "attention"
property$count: int readonly
property$tone: string readonly
property$label: string readonly
method__construct(int $count, string $tone = "attention", string $label = "")
methodgetDisplay(): string

Mrx\Light\Api\Navigation\BadgeCacheInterface

Interface. Works in every area (admin, storefront, REST, cron), so an observer can call it wherever an order or a request changes.

KindMember
methodinvalidate(string ...$itemKeys): void

Mrx\Light\Api\Navigation\BadgeProviderInterface

Interface. The first counter contract, still read through the BadgePool "badges" argument: digits (optionally followed by "+") count, other text shows only while nothing else counts. Light caches the value per admin language and asks again at most once a minute, in a background request. New counters implement BadgeSourceInterface.

KindMember
methodgetBadge(): ?string

Mrx\Light\Api\Navigation\BadgeReaderInterface

Interface. What the current admin sees for one nav item: every provider merged, the ACL applied. Admin area only, because the value depends on the signed-in admin's role and language.

KindMember
methodget(string $itemKey): ?Mrx\Light\Api\Navigation\Badge

Mrx\Light\Api\Navigation\BadgeSourceInterface

Interface. A count on a nav item, registered in the Mrx\Light\Model\Navigation\BadgePool "providers" argument. Light caches the value per admin language and asks again at most once per "ttl", in a background request.

KindMember
methodgetBadgeValue(): ?Mrx\Light\Api\Navigation\Badge

Mrx\Light\Api\Navigation\ItemProviderInterface

Interface. Navigation items that can only be known at runtime (pinned apps, a module's own screens). Called at most once per request, on every simple-mode page, so read from a cache or one cheap query.

KindMember
methodgetItems(): array

Mrx\Light\Api\PageHeader\ActionConditionInterface

Interface. The "condition" of a header action (spec section 7): whether the action shows on this request, for example only for simple products. It runs every time the page renders, so keep it cheap. A condition that throws leaves its action out and is logged.

KindMember
methodisAvailable(Magento\Framework\App\RequestInterface $request): bool

Mrx\Light\Api\Redirect\ConditionInterface

Interface. Optional per-entry check for simple-mode redirects, e.g. "only simple products".

KindMember
methodshouldRedirect(Magento\Framework\App\RequestInterface $request): bool

Mrx\Light\Api\Redirect\ParamsResolverInterface

Interface. Optional per-entry lookup for simple-mode redirects whose Light screen needs a parameter the stock URL doesn't carry, e.g. the order of an invoice. Such an entry is one-way: the mode switch can't map the Light page back to it.

KindMember
methodresolve(Magento\Framework\App\RequestInterface $request): ?array

Mrx\Light\Api\Search\GroupInterface

Interface.

KindMember
methodgetLabel(): string
methodgetAclResource(): string
methodgetSortOrder(): int
methodsearch(string $query, int $limit): array

Mrx\Light\Attribute\ProvidesNavItems

Class. Names the nav item keys an ItemProviderInterface class can return, so bin/magento mrx:light:doctor accepts the counters, to-dos and child items that point at them. Keys that only exist at runtime, such as one per record, stay out. The doctor reads it from the class and its parents and never instantiates the provider.

KindMember
property$keys: array readonly

Mrx\Light\Attribute\RequiresModule

Class. Marks a class (provider, badge, extension, Light controller) as usable only while the named modules are enabled. Read by Mrx\Light\Model\ModuleGate, which also checks every parent class, so a generated Proxy or Interceptor carries the requirement of the class it extends.

KindMember
property$modules: array readonly

Mrx\Light\Block\AdvancedHint

Class. "Only available in the advanced view. Open in advanced view" (spec section 7). Layout arguments: route, params, text, link_label, resource and module. It renders nothing without a route, or when the admin couldn't open the link: the resource is denied, the module is off, or the route's controller refuses the admin.

KindMember
methodgetLink(): string
methodgetText(): string
methodgetLinkLabel(): string
methodgetIconHtml(): string

Mrx\Light\Block\Form\ExtensionCard

Class. A card drawn from the fields a form extension declares (spec 6.2): adding fields to an editor takes one PHP class, one DI item and one layout block. Layout arguments: "extension" (the code in form_extensions), "title", and optionally "js", a RequireJS module with the card's form hooks (spec 6.3). It renders nothing on a page without a form, in a language view, and for an extension this admin can't use or that declares no fields.

KindMember
constTYPES[] = "text"
constTYPES[] = "textarea"
constTYPES[] = "number"
constTYPES[] = "select"
constTYPES[] = "toggle"
methodgetExtensionCode(): string
methodgetTitle(): string
methodgetFields(): array
methodhasLoadFailed(): bool
methodgetHooksModule(): string
methodgetIconHtml(string $name): string

Mrx\Light\Block\IndexTable

Class.

KindMember
methodgetProviderCode(): string
methodisAllowed(): bool
methodsetFilters(array $filters): Mrx\Light\Block\IndexTable
methodisCard(): bool
methodgetConfigJson(): string

Mrx\Light\Block\PageHeader

Class.

KindMember
methodsetTitle(string $title): Mrx\Light\Block\PageHeader
methodgetTitle(): string
methodsetSubtitle(string $subtitle): Mrx\Light\Block\PageHeader
methodgetSubtitle(): string
methodsetBack(string $url, string $label = ""): Mrx\Light\Block\PageHeader
methodgetBackUrl(): string
methodgetBackLabel(): string
methodaddBadge(string $label, string $tone = "neutral", string $progress = "", string $progressTone = ""): Mrx\Light\Block\PageHeader
methodgetBadges(): array
methodsetPrimaryAction(array $action): Mrx\Light\Block\PageHeader
methodgetPrimaryAction(): ?array
methodaddSecondaryAction(array $action): Mrx\Light\Block\PageHeader
methodgetSecondaryActions(): array
methodaddMoreAction(array $action): Mrx\Light\Block\PageHeader
methodgetMoreActions(): array
methodrenderAttributes(array $attributes): string

Mrx\Light\Block\SlotOutline

Class. Marks a layout container that other modules can add blocks to. Page modules put one in each of their containers; it only shows in developer mode with ?mrx_slots=1, so developers and tests can see where to plug in.

KindMember
constPARAM = "mrx_slots"
methodgetSlot(): string

Mrx\Light\Controller\Adminhtml\AbstractPage

Abstract class.

KindMember
constADMIN_RESOURCE = "Mrx_Light::light"
constHANDLE = "mrx_page"
constWIDTH_DEFAULT = "default"
constWIDTH_NARROW = "narrow"
constWIDTH_FULL = "full"
protected constACTIVE_MENU = ""
protected constPAGE_WIDTH = "default"
protected property$resultPageFactory: Magento\Framework\View\Result\PageFactory readonly
method__construct(Magento\Backend\App\Action\Context $context, Magento\Framework\View\Result\PageFactory $resultPageFactory)
protectedgetPageTitle(): Magento\Framework\Phrase|string
protectedcreatePage(Magento\Framework\Phrase|string $title): Magento\Backend\Model\View\Result\Page
protectedgetPageHeader(Magento\Backend\Model\View\Result\Page $page): ?Mrx\Light\Block\PageHeader

Mrx\Light\Model\Channel\Channel

Class.

KindMember
property$id: int readonly
property$code: string readonly
property$name: string readonly
property$websiteName: string readonly
property$baseUrl: string readonly
property$rootCategoryId: int readonly
property$defaultLanguageId: int readonly
property$isDefault: bool readonly
property$sortOrder: int readonly
property$languages: array readonly
methodgetDefaultLanguage(): ?Mrx\Light\Model\Channel\Language
methodgetLanguage(int $storeId): ?Mrx\Light\Model\Channel\Language
methodgetStoreIds(): array
methodisMultiLanguage(): bool
methodgetHost(): string
methodtoArray(): array

Mrx\Light\Model\Channel\ChannelProvider

Class. A channel is a website and a language is a store view; store groups stay invisible (spec D11-D12).

KindMember
methodgetChannels(): array
methodgetChannel(int $channelId): ?Mrx\Light\Model\Channel\Channel
methodhasChannel(int $channelId): bool
methodgetChannelIds(): array
methodgetDefaultChannel(): ?Mrx\Light\Model\Channel\Channel
methodgetLanguages(): array
methodgetLanguage(int $storeId): ?Mrx\Light\Model\Channel\Language
methodchannelOfStore(int $storeId): ?Mrx\Light\Model\Channel\Channel
methodisMultiChannel(): bool
methodisMultiLanguage(?int $channelId = null): bool
methodgetChannelsByRootCategory(int $categoryId): array
methodgetChannelName(int $channelId): string
methodgetStorefrontUrl(int $storeId, string $path = ""): string
methodtoArray(): array
methodreset(): void

Mrx\Light\Model\Channel\Language

Class.

KindMember
property$id: int readonly
property$code: string readonly
property$name: string readonly
property$locale: string readonly
property$channelId: int readonly
property$isDefault: bool readonly
property$isActive: bool readonly
property$sortOrder: int readonly
property$baseUrl: string readonly
property$storefrontUrl: string readonly
methodtoArray(): array

Mrx\Light\Model\IndexTable\Query

Class.

KindMember
property$tab: string readonly
property$search: string readonly
property$sort: string readonly
property$direction: string readonly
property$page: int readonly
property$pageSize: int readonly
property$filters: array readonly
methodgetOffset(): int
methodisAscending(): bool
methodgetFilter(string $key): ?string
methodgetChannelId(): ?int
methodwithPage(int $page): Mrx\Light\Model\IndexTable\Query

Mrx\Light\Model\Redirect\Condition\HasParam

Class. Redirects only a stock screen that shows one record: without its id the same action is the stock "new" form (system_store/newWebsite forwards to editWebsite), which the Light record page can't show. A bridge names it as the type of a virtual type with its own "param", the way mrx:light:app writes it, so the name of that constructor argument is contract too. The surface leaves out the constructors DI calls; AppGeneratorTest pins this one.

KindMember
methodshouldRedirect(Magento\Framework\App\RequestInterface $request): bool

Mrx\Light\ViewModel\Icons

Class. Keep in sync with Mrx_Light/js/icons, which renders the same set in the browser.

KindMember
methodrender(string $name, string $class = "", string $label = ""): string
methodhas(string $name): bool
methodgetNames(): array
methodgetRegisteredPaths(): array

Mrx\Locations\Api\Data\LocationInterface

Interface. One location, read only. Change a location through Magento's source repository or Settings > Locations.

KindMember
methodgetCode(): string
methodgetName(): string
methodgetAddressLines(): array
methodgetPhone(): string
methodisEnabled(): bool
methodsellsOnline(): bool
methodisPickup(): bool
methodgetPickupName(): string
methodgetOpeningHours(): string
methodgetPickupInstructions(): string
methodgetReadyTime(): string
methodgetPosition(): int
methodgetChannelIds(): array

Mrx\Locations\Api\LocationsInterface

Interface. The places a shop keeps stock and customers pick up, read from Magento's inventory sources. In simple mode (no inventory modules, or one enabled source) there is exactly one location: the business address from Business details, with code ''. In locations mode every enabled source is a location, except Magento's default source.

KindMember
methodisAvailable(): bool
methodisMultiLocation(): bool
methodgetLocations(bool $includeDisabled = false): array
methodgetMain(): ?Mrx\Locations\Api\Data\LocationInterface
methodgetForChannel(int $websiteId): array

Mrx\Orders\Api\OrderActionConditionInterface

Interface.

KindMember
methodisAvailable(Magento\Sales\Api\Data\OrderInterface $order): bool

Mrx\Orders\Api\OrderPageContextInterface

Interface. The order the Light order page shows. A card in one of the page's containers asks for this interface and gets the page's own view model, so it never loads the order a second time.

KindMember
methodgetOrder(): ?Magento\Sales\Api\Data\OrderInterface

Mrx\Orders\Api\PaymentMode

Class. How a payment module tells Light that a payment was made in its test mode: it stores INFO_KEY => TEST in the payment's additional information (LIVE for a real one). The order page then warns while the order is open that no money was received, for any provider; the provider's name comes from its payment_providers item.

KindMember
constINFO_KEY = "mrx_payment_mode"
constTEST = "test"
constLIVE = "live"

Mrx\Orders\Api\RefundReasonInterface

Interface. Magento's RefundInvoice turns every refund failure into "Could not save a Creditmemo". A payment module that refuses a refund sets one sentence here before it throws; the refund then fails with that sentence instead.

KindMember
methodset(string $reason): void
methodtake(): ?string

Mrx\Orders\Api\TimelineProviderInterface

Interface.

KindMember
methodgetEvents(Magento\Sales\Api\Data\OrderInterface $order): array

Mrx\Orders\Api\TotalsProviderInterface

Interface.

KindMember
methodgetRows(Magento\Sales\Api\Data\OrderInterface $order): array

Mrx\Settings\Api\ChannelPaymentProviderStateInterface

Interface. A provider state that can answer for one channel. Implement it instead of PaymentProviderStateInterface when the provider can be connected or switched on per channel (website): Settings > Payments then asks isOfferedIn() for the channel it saves, so a provider that is on in that channel only counts there, and one that is off there doesn't. A state that implements only PaymentProviderStateInterface is asked isOffered() for every channel, as before.

KindMember
methodisOfferedIn(?int $channelId): bool

Mrx\Settings\Api\ChannelScopedInterface

Interface. Marks a settings page whose fields can differ per channel: it shows "Applies to", and a stock configuration link that names a website opens it with that channel selected.

KindMember
constPARAM = "channel"

Mrx\Settings\Api\LegalPageVariablesInterface

Interface. Extra placeholders for legal page drafts in one language, such as the register line a German Impressum needs. Named as "variables" by the drafts' items in Mrx\Settings\Model\LegalPages\Templates (catalogue pool legal_page_templates).

KindMember
methodgetVariables(string $type, int $storeId, array $values): array

Mrx\Settings\Api\NormalizesInputInterface

Interface. Pages that store a cleaned-up version of what was typed ("nl 1234.56.789.b01" becomes "NL123456789B01") return those values after save, so the form shows what was actually saved.

KindMember
methodgetNormalizedValues(): array

Mrx\Settings\Api\OssInterface

Interface. VAT on sales to consumers in other EU countries, the One Stop Shop (Settings > Taxes, "Sales to other EU countries"). A module that sets up the home country's rates asks it, so its own status reads the right basis, and lets it add its rates first: without them its check would see orders to other EU countries at 0%.

KindMember
methodisUsed(): bool
methodaddRates(): array

Mrx\Settings\Api\PageInterface

Interface. A settings page under light/settings. Register it in the "pages" argument of Mrx\Settings\Model\Page\Pool, keyed by its code: as an object, or as an array schema that Light turns into a page (spec section 4).

KindMember
methodgetAclResources(): array
methodgetCacheTypes(): array
methodsave(array $data): string

Mrx\Settings\Api\PaymentMethodsInterface

Interface. The question a payment provider module asks before it lets the merchant switch it off: can customers still pay another way?

KindMember
methodhasOtherCheckoutMethod(string $exceptPrefix, ?int $channelId): bool

Mrx\Settings\Api\PaymentProviderCardInterface

Interface. What Settings > Payments shows on a provider's card. Registered as "card" of the provider's item in the pool payment_providers; a provider with own_section and a card gets core's card, its forms go into the card's panels (block mrx.settings.payments.online, children "_connection" and "_methods"). Every method answers from stored config or the provider module's own cache: a page render never waits for the provider's API.

KindMember
constSTATUS_NOT_CONNECTED = "not_connected"
constSTATUS_OFF = "off"
constSTATUS_TEST = "test"
constSTATUS_NO_METHODS = "no_methods"
constSTATUS_LIVE = "live"
methodgetStatus(?int $channelId): string
methodgetAccountName(?int $channelId): string
methodgetMethods(?int $channelId): array
methodgetAdvancedRows(?int $channelId): array

Mrx\Settings\Api\PaymentProviderStateInterface

Interface. Whether a payment provider module takes payments right now. Registered as "state" of the provider's item in the pool payment_providers (Mrx\Settings\Model\Payments\ProviderDetector, argument "providers"). While isOffered() is false, Settings > Payments counts the provider's methods as off, so it doesn't let the merchant switch off the last method customers can really pay with.

KindMember
methodisOffered(): bool

Mrx\Settings\Api\ReloadsAfterSaveInterface

Interface. A page whose save changes what the page itself shows beyond its own fields (channel notes, names in the header), so the form reloads after saving instead of staying as it is.

KindMember
methodshouldReload(): bool

Mrx\Settings\Api\ScopedConfigWriterInterface

Interface. Saves config values at one scope: all channels (both ids null), one channel (a website) or one store view. Values go through Magento\Config\Model\Config, so backend models run. For a channel, a value equal to what the channel reads now is not written, and any other value becomes the channel's own, also one equal to the all-channels value; pass null to remove it so the channel follows all channels again. A masked secret ("******") is never written. Admin area only: the preference lives in etc/adminhtml/di.xml, because Magento loads system.xml, and with it the backend models, in the admin only.

KindMember
methodsave(array $values, ?int $websiteId = null, ?int $storeId = null): array

Mrx\Settings\Api\SettingsValidatorInterface

Interface. Checks a schema settings page (its "validator" key) after the system.xml validate classes passed.

KindMember
methodvalidate(array $values, ?int $websiteId): array

Mrx\Settings\Api\ValidationException

Class. Field errors of a settings save. The page answers 422 with "errors", and the form shows each message under the input of that name.

KindMember
method__construct(array $errors, ?Magento\Framework\Phrase $phrase = null)
methodgetErrors(): array

Mrx\Settings\Api\ZonesWriterInterface

Interface. Saves a shop's shipping zones for all channels, the way Settings > Shipping stores them. A country module that seeds zones for its country uses it once, from a data patch, while the shop has no zones yet.

KindMember
methodhasZones(): bool
methodsave(array $zones): void

Mrx\Settings\Controller\Adminhtml\Settings\AbstractSettingsPage

Abstract class.

KindMember
constADMIN_RESOURCE = "Magento_Config::config"
protected constACTIVE_MENU = "Magento_Config::system_config"
protected constPAGE_CODE = ""
constSETTINGS_HANDLE = "mrx_settings_page"
protected property$pool: Mrx\Settings\Model\Page\Pool readonly
method__construct(Magento\Backend\App\Action\Context $context, Magento\Framework\View\Result\PageFactory $resultPageFactory, Mrx\Settings\Model\Page\Pool $pool)
protectedgetPageCode(): string

Mrx\Settings\Model\Page\ChannelScopedInterface

Interface. Deprecated since 0.1.0.

Mrx\Settings\Model\Page\PageInterface

Interface. Deprecated since 0.1.0.

Mrx\Settings\Model\Tax\PriceDisplay

Class. "Prices include tax" as one switch: entered prices, shipping prices and every place prices are shown follow it.

KindMember
methodincludesTax(): bool
methodgetConfig(bool $includesTax): array

Mrx\Settings\Model\Tax\TaxRecords

Class. Every tax rate and rule, loaded once per request: one render of the Taxes page needs them in a tax setup's status, the OSS rates and the rates table. Rates and rules are saved through here, so the next read sees the change.

KindMember
methodgetRates(): array
methodgetRules(): array
methodfindRule(string $code): ?Magento\Tax\Api\Data\TaxRuleInterface
methodgetRuleRateIds(): array
methodratedCountries(): array
methodrulesCharging(string $country): array
methodcustomerClassId(): int
methodproductClassIds(): array
methodcustomerClassNames(): array
methodisWholeCountry(Magento\Tax\Api\Data\TaxRateInterface $rate): bool
methodsaveRate(Magento\Tax\Api\Data\TaxRateInterface $rate): Magento\Tax\Api\Data\TaxRateInterface
methodsaveRule(Magento\Tax\Api\Data\TaxRuleInterface $rule): Magento\Tax\Api\Data\TaxRuleInterface
methoddeleteRate(int $rateId): void

Mrx\Settings\Model\ValidationException

Class. Deprecated since 0.1.0.

Mrx\Settings\ViewModel\Fields

Class. The form controls of Light's settings pages, for a module's own settings template (layout argument "fields"): the same markup, channel note and lock state as core's pages. A control with a "path" option shows the note of that setting for the page's channel ("Changed for …" with its reset link, the lock note, or "… uses its own value" under All channels) and is disabled while the setting can't differ per channel. Under it, each store view with a value of its own from the advanced view gets a note that names its language ("Changed for Deutsch in the advanced view") with a button that removes that value on save. Every value passed in is escaped here, except "help_html", which the caller escaped.

KindMember
methodicon(string $name, string $class = ""): string
methodidFor(string $name): string
methodfield(string $name, string $label, string $value, array $options = []): string
methodselect(string $name, string $label, array $choices, string $value, array $options = []): string
methodmultiselect(string $name, string $label, array $choices, array $values, array $options = []): string
methodtoggle(string $name, string $label, bool $checked, array $options = []): string

Last updated on

On this page

Mrx\Catalog\Api\ProductPageContextInterfaceMrx\Customers\Api\CustomerNotesInterfaceMrx\Customers\Api\CustomerPageContextInterfaceMrx\Customers\Api\TimelineProviderInterfaceMrx\Documents\Api\Data\DocumentMrx\Documents\Api\DocumentRendererInterfaceMrx\Documents\Api\DocumentSectionInterfaceMrx\Documents\Api\DocumentTypeInterfaceMrx\Documents\Api\ItemLineInterfaceMrx\Documents\Api\PdfRendererInterfaceMrx\Documents\Api\PickLocationInterfaceMrx\Home\Api\ChannelAwareCounterInterfaceMrx\Home\Api\CounterInterfaceMrx\Home\Api\SetupCheckInterfaceMrx\Home\Api\SetupDescriptionInterfaceMrx\Light\Api\AdvancedUrlInterfaceMrx\Light\Api\AdvancedView\BackLinkProviderInterfaceMrx\Light\Api\Branding\BrandMrx\Light\Api\Branding\BrandInterfaceMrx\Light\Api\ExtensionApiMrx\Light\Api\FormOfAddressInterfaceMrx\Light\Api\Form\AppliesToEntityInterfaceMrx\Light\Api\Form\CurrentFormInterfaceMrx\Light\Api\Form\DeclaresFieldsInterfaceMrx\Light\Api\Form\FormContextInterfaceMrx\Light\Api\Form\FormExtensionInterfaceMrx\Light\Api\IndexTable\ChannelFilterAwareInterfaceMrx\Light\Api\IndexTable\FilterableProviderInterfaceMrx\Light\Api\IndexTable\ProviderExtensionInterfaceMrx\Light\Api\IndexTable\ProviderInterfaceMrx\Light\Api\IndexTable\RowActionsInterfaceMrx\Light\Api\ModeInterfaceMrx\Light\Api\Navigation\BadgeMrx\Light\Api\Navigation\BadgeCacheInterfaceMrx\Light\Api\Navigation\BadgeProviderInterfaceMrx\Light\Api\Navigation\BadgeReaderInterfaceMrx\Light\Api\Navigation\BadgeSourceInterfaceMrx\Light\Api\Navigation\ItemProviderInterfaceMrx\Light\Api\PageHeader\ActionConditionInterfaceMrx\Light\Api\Redirect\ConditionInterfaceMrx\Light\Api\Redirect\ParamsResolverInterfaceMrx\Light\Api\Search\GroupInterfaceMrx\Light\Attribute\ProvidesNavItemsMrx\Light\Attribute\RequiresModuleMrx\Light\Block\AdvancedHintMrx\Light\Block\Form\ExtensionCardMrx\Light\Block\IndexTableMrx\Light\Block\PageHeaderMrx\Light\Block\SlotOutlineMrx\Light\Controller\Adminhtml\AbstractPageMrx\Light\Model\Channel\ChannelMrx\Light\Model\Channel\ChannelProviderMrx\Light\Model\Channel\LanguageMrx\Light\Model\IndexTable\QueryMrx\Light\Model\Redirect\Condition\HasParamMrx\Light\ViewModel\IconsMrx\Locations\Api\Data\LocationInterfaceMrx\Locations\Api\LocationsInterfaceMrx\Orders\Api\OrderActionConditionInterfaceMrx\Orders\Api\OrderPageContextInterfaceMrx\Orders\Api\PaymentModeMrx\Orders\Api\RefundReasonInterfaceMrx\Orders\Api\TimelineProviderInterfaceMrx\Orders\Api\TotalsProviderInterfaceMrx\Settings\Api\ChannelPaymentProviderStateInterfaceMrx\Settings\Api\ChannelScopedInterfaceMrx\Settings\Api\LegalPageVariablesInterfaceMrx\Settings\Api\NormalizesInputInterfaceMrx\Settings\Api\OssInterfaceMrx\Settings\Api\PageInterfaceMrx\Settings\Api\PaymentMethodsInterfaceMrx\Settings\Api\PaymentProviderCardInterfaceMrx\Settings\Api\PaymentProviderStateInterfaceMrx\Settings\Api\ReloadsAfterSaveInterfaceMrx\Settings\Api\ScopedConfigWriterInterfaceMrx\Settings\Api\SettingsValidatorInterfaceMrx\Settings\Api\ValidationExceptionMrx\Settings\Api\ZonesWriterInterfaceMrx\Settings\Controller\Adminhtml\Settings\AbstractSettingsPageMrx\Settings\Model\Page\ChannelScopedInterfaceMrx\Settings\Model\Page\PageInterfaceMrx\Settings\Model\Tax\PriceDisplayMrx\Settings\Model\Tax\TaxRecordsMrx\Settings\Model\ValidationExceptionMrx\Settings\ViewModel\Fields