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".
| Kind | Member |
|---|---|
| method | getProduct(): ?Magento\Catalog\Api\Data\ProductInterface |
Mrx\Customers\Api\CustomerNotesInterface
Interface.
| Kind | Member |
|---|---|
| const | MAX_LENGTH = 5000 |
| const | EMAIL_WELCOME = "email_welcome" |
| const | EMAIL_CONFIRMATION = "email_confirm" |
| const | EMAIL_PASSWORD_RESET = "email_reset" |
| method | getNote(int $customerId): ?array |
| method | saveNote(int $customerId, string $body, ?int $adminUserId): void |
| method | addComment(int $customerId, string $body, ?int $adminUserId): int |
| method | deleteComment(int $customerId, int $commentId): bool |
| method | getComments(int $customerId, int $limit = 100): array |
| method | addMarketingChange(int $customerId, string $status): void |
| method | getMarketingChanges(int $customerId, int $limit = 50): array |
| method | addEmailEvent(int $customerId, string $type, string $recipient, ?int $adminUserId): void |
| method | getEmailEvents(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.
| Kind | Member |
|---|---|
| method | getCustomer(): ?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.
| Kind | Member |
|---|---|
| method | getEvents(Magento\Customer\Api\Data\CustomerInterface $customer): array |
Mrx\Documents\Api\Data\Document
Class.
| Kind | Member |
|---|---|
| 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.
| Kind | Member |
|---|---|
| method | render(string $type, array $ids): string |
| method | renderDocuments(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.
| Kind | Member |
|---|---|
| method | render(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.
| Kind | Member |
|---|---|
| method | getLabel(): string |
| method | getAclResource(): string |
| method | getTemplate(): string |
| method | getData(array $ids): array |
| method | getFilename(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.
| Kind | Member |
|---|---|
| method | getLines(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.
| Kind | Member |
|---|---|
| method | render(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.
| Kind | Member |
|---|---|
| method | getLocations(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.
| Kind | Member |
|---|---|
| method | getCount(?Mrx\Light\Model\Channel\Channel $channel = null): int |
Mrx\Home\Api\CounterInterface
Interface.
| Kind | Member |
|---|---|
| method | getCount(): int |
Mrx\Home\Api\SetupCheckInterface
Interface.
| Kind | Member |
|---|---|
| method | isComplete(): 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 ''.
| Kind | Member |
|---|---|
| method | getDescription(): 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.
| Kind | Member |
|---|---|
| const | PARAM = "mrx_stock" |
| method | get(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.
| Kind | Member |
|---|---|
| method | getBackLink(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.
| Kind | Member |
|---|---|
| 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.
| Kind | Member |
|---|---|
| method | get(): 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".
| Kind | Member |
|---|---|
| const | VERSION |
| method static | satisfies(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.
| Kind | Member |
|---|---|
| const | INFORMAL = "informal" |
| const | FORMAL = "formal" |
| const | XML_PATH = "mrx_light/locale/form_of_address" |
| method | forStore(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).
| Kind | Member |
|---|---|
| method | apply(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.
| Kind | Member |
|---|---|
| method | get(): ?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.
| Kind | Member |
|---|---|
| method | getFields(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.
| Kind | Member |
|---|---|
| method | getFormCode(): string |
| method | getEntityId(): ?int |
| method | getEntity(): ?object |
| method | getStoreId(): 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.
| Kind | Member |
|---|---|
| method | load(Mrx\Light\Api\Form\FormContextInterface $context): array |
| method | validate(Mrx\Light\Api\Form\FormContextInterface $context, array $input): array |
| method | save(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']).
| Kind | Member |
|---|---|
| const | FILTER_KEY = "channel" |
Mrx\Light\Api\IndexTable\FilterableProviderInterface
Interface.
| Kind | Member |
|---|---|
| method | getFilterKeys(): array |
Mrx\Light\Api\IndexTable\ProviderExtensionInterface
Interface. Adds columns and bulk actions to another module's table (registered in Mrx\Light\Model\IndexTable\ExtensionPool).
| Kind | Member |
|---|---|
| method | getColumns(): array |
| method | getBulkActions(): array |
| method | decorateRows(array $rows, Mrx\Light\Model\IndexTable\Query $query): array |
Mrx\Light\Api\IndexTable\ProviderInterface
Interface.
| Kind | Member |
|---|---|
| const | TYPE_TEXT = "text" |
| const | TYPE_LINK = "link" |
| const | TYPE_BADGE = "badge" |
| const | TYPE_MONEY = "money" |
| const | TYPE_DATE = "date" |
| const | TYPE_THUMBNAIL = "thumbnail" |
| const | TYPE_NUMBER = "number" |
| const | TYPE_TAGS = "tags" |
| const | TYPE_CHANNEL = "channel" |
| const | TYPE_LANGUAGE = "language" |
| method | getAclResource(): string |
| method | getColumns(): array |
| method | getTabs(): array |
| method | getDefaultSort(): array |
| method | getSearchPlaceholder(): string |
| method | getBulkActions(): array |
| method | getEmptyState(): array |
| method | getRows(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 "_".
| Kind | Member |
|---|---|
| method | getRowActions(): 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.
| Kind | Member |
|---|---|
| const | SIMPLE = "simple" |
| const | ADVANCED = "advanced" |
| method | get(): string |
| method | isSimple(): bool |
| method | isStockView(): bool |
| method | showsLight(): 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.
| Kind | Member |
|---|---|
| const | TONES[] = "critical" |
| const | TONES[] = "attention" |
| property | $count: int readonly |
| property | $tone: string readonly |
| property | $label: string readonly |
| method | __construct(int $count, string $tone = "attention", string $label = "") |
| method | getDisplay(): 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.
| Kind | Member |
|---|---|
| method | invalidate(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.
| Kind | Member |
|---|---|
| method | getBadge(): ?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.
| Kind | Member |
|---|---|
| method | get(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.
| Kind | Member |
|---|---|
| method | getBadgeValue(): ?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.
| Kind | Member |
|---|---|
| method | getItems(): 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.
| Kind | Member |
|---|---|
| method | isAvailable(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".
| Kind | Member |
|---|---|
| method | shouldRedirect(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.
| Kind | Member |
|---|---|
| method | resolve(Magento\Framework\App\RequestInterface $request): ?array |
Mrx\Light\Api\Search\GroupInterface
Interface.
| Kind | Member |
|---|---|
| method | getLabel(): string |
| method | getAclResource(): string |
| method | getSortOrder(): int |
| method | search(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.
| Kind | Member |
|---|---|
| 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.
| Kind | Member |
|---|---|
| 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.
| Kind | Member |
|---|---|
| method | getLink(): string |
| method | getText(): string |
| method | getLinkLabel(): string |
| method | getIconHtml(): 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.
| Kind | Member |
|---|---|
| const | TYPES[] = "text" |
| const | TYPES[] = "textarea" |
| const | TYPES[] = "number" |
| const | TYPES[] = "select" |
| const | TYPES[] = "toggle" |
| method | getExtensionCode(): string |
| method | getTitle(): string |
| method | getFields(): array |
| method | hasLoadFailed(): bool |
| method | getHooksModule(): string |
| method | getIconHtml(string $name): string |
Mrx\Light\Block\IndexTable
Class.
| Kind | Member |
|---|---|
| method | getProviderCode(): string |
| method | isAllowed(): bool |
| method | setFilters(array $filters): Mrx\Light\Block\IndexTable |
| method | isCard(): bool |
| method | getConfigJson(): string |
Mrx\Light\Block\PageHeader
Class.
| Kind | Member |
|---|---|
| method | setTitle(string $title): Mrx\Light\Block\PageHeader |
| method | getTitle(): string |
| method | setSubtitle(string $subtitle): Mrx\Light\Block\PageHeader |
| method | getSubtitle(): string |
| method | setBack(string $url, string $label = ""): Mrx\Light\Block\PageHeader |
| method | getBackUrl(): string |
| method | getBackLabel(): string |
| method | addBadge(string $label, string $tone = "neutral", string $progress = "", string $progressTone = ""): Mrx\Light\Block\PageHeader |
| method | getBadges(): array |
| method | setPrimaryAction(array $action): Mrx\Light\Block\PageHeader |
| method | getPrimaryAction(): ?array |
| method | addSecondaryAction(array $action): Mrx\Light\Block\PageHeader |
| method | getSecondaryActions(): array |
| method | addMoreAction(array $action): Mrx\Light\Block\PageHeader |
| method | getMoreActions(): array |
| method | renderAttributes(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.
| Kind | Member |
|---|---|
| const | PARAM = "mrx_slots" |
| method | getSlot(): string |
Mrx\Light\Controller\Adminhtml\AbstractPage
Abstract class.
| Kind | Member |
|---|---|
| const | ADMIN_RESOURCE = "Mrx_Light::light" |
| const | HANDLE = "mrx_page" |
| const | WIDTH_DEFAULT = "default" |
| const | WIDTH_NARROW = "narrow" |
| const | WIDTH_FULL = "full" |
| protected const | ACTIVE_MENU = "" |
| protected const | PAGE_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) |
| protected | getPageTitle(): Magento\Framework\Phrase|string |
| protected | createPage(Magento\Framework\Phrase|string $title): Magento\Backend\Model\View\Result\Page |
| protected | getPageHeader(Magento\Backend\Model\View\Result\Page $page): ?Mrx\Light\Block\PageHeader |
Mrx\Light\Model\Channel\Channel
Class.
| Kind | Member |
|---|---|
| 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 |
| method | getDefaultLanguage(): ?Mrx\Light\Model\Channel\Language |
| method | getLanguage(int $storeId): ?Mrx\Light\Model\Channel\Language |
| method | getStoreIds(): array |
| method | isMultiLanguage(): bool |
| method | getHost(): string |
| method | toArray(): 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).
| Kind | Member |
|---|---|
| method | getChannels(): array |
| method | getChannel(int $channelId): ?Mrx\Light\Model\Channel\Channel |
| method | hasChannel(int $channelId): bool |
| method | getChannelIds(): array |
| method | getDefaultChannel(): ?Mrx\Light\Model\Channel\Channel |
| method | getLanguages(): array |
| method | getLanguage(int $storeId): ?Mrx\Light\Model\Channel\Language |
| method | channelOfStore(int $storeId): ?Mrx\Light\Model\Channel\Channel |
| method | isMultiChannel(): bool |
| method | isMultiLanguage(?int $channelId = null): bool |
| method | getChannelsByRootCategory(int $categoryId): array |
| method | getChannelName(int $channelId): string |
| method | getStorefrontUrl(int $storeId, string $path = ""): string |
| method | toArray(): array |
| method | reset(): void |
Mrx\Light\Model\Channel\Language
Class.
| Kind | Member |
|---|---|
| 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 |
| method | toArray(): array |
Mrx\Light\Model\IndexTable\Query
Class.
| Kind | Member |
|---|---|
| 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 |
| method | getOffset(): int |
| method | isAscending(): bool |
| method | getFilter(string $key): ?string |
| method | getChannelId(): ?int |
| method | withPage(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.
| Kind | Member |
|---|---|
| method | shouldRedirect(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.
| Kind | Member |
|---|---|
| method | render(string $name, string $class = "", string $label = ""): string |
| method | has(string $name): bool |
| method | getNames(): array |
| method | getRegisteredPaths(): array |
Mrx\Locations\Api\Data\LocationInterface
Interface. One location, read only. Change a location through Magento's source repository or Settings > Locations.
| Kind | Member |
|---|---|
| method | getCode(): string |
| method | getName(): string |
| method | getAddressLines(): array |
| method | getPhone(): string |
| method | isEnabled(): bool |
| method | sellsOnline(): bool |
| method | isPickup(): bool |
| method | getPickupName(): string |
| method | getOpeningHours(): string |
| method | getPickupInstructions(): string |
| method | getReadyTime(): string |
| method | getPosition(): int |
| method | getChannelIds(): 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.
| Kind | Member |
|---|---|
| method | isAvailable(): bool |
| method | isMultiLocation(): bool |
| method | getLocations(bool $includeDisabled = false): array |
| method | getMain(): ?Mrx\Locations\Api\Data\LocationInterface |
| method | getForChannel(int $websiteId): array |
Mrx\Orders\Api\OrderActionConditionInterface
Interface.
| Kind | Member |
|---|---|
| method | isAvailable(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.
| Kind | Member |
|---|---|
| method | getOrder(): ?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.
| Kind | Member |
|---|---|
| const | INFO_KEY = "mrx_payment_mode" |
| const | TEST = "test" |
| const | LIVE = "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.
| Kind | Member |
|---|---|
| method | set(string $reason): void |
| method | take(): ?string |
Mrx\Orders\Api\TimelineProviderInterface
Interface.
| Kind | Member |
|---|---|
| method | getEvents(Magento\Sales\Api\Data\OrderInterface $order): array |
Mrx\Orders\Api\TotalsProviderInterface
Interface.
| Kind | Member |
|---|---|
| method | getRows(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.
| Kind | Member |
|---|---|
| method | isOfferedIn(?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.
| Kind | Member |
|---|---|
| const | PARAM = "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).
| Kind | Member |
|---|---|
| method | getVariables(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.
| Kind | Member |
|---|---|
| method | getNormalizedValues(): 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%.
| Kind | Member |
|---|---|
| method | isUsed(): bool |
| method | addRates(): 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).
| Kind | Member |
|---|---|
| method | getAclResources(): array |
| method | getCacheTypes(): array |
| method | save(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?
| Kind | Member |
|---|---|
| method | hasOtherCheckoutMethod(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.
| Kind | Member |
|---|---|
| const | STATUS_NOT_CONNECTED = "not_connected" |
| const | STATUS_OFF = "off" |
| const | STATUS_TEST = "test" |
| const | STATUS_NO_METHODS = "no_methods" |
| const | STATUS_LIVE = "live" |
| method | getStatus(?int $channelId): string |
| method | getAccountName(?int $channelId): string |
| method | getMethods(?int $channelId): array |
| method | getAdvancedRows(?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.
| Kind | Member |
|---|---|
| method | isOffered(): 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.
| Kind | Member |
|---|---|
| method | shouldReload(): 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.
| Kind | Member |
|---|---|
| method | save(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.
| Kind | Member |
|---|---|
| method | validate(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.
| Kind | Member |
|---|---|
| method | __construct(array $errors, ?Magento\Framework\Phrase $phrase = null) |
| method | getErrors(): 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.
| Kind | Member |
|---|---|
| method | hasZones(): bool |
| method | save(array $zones): void |
Mrx\Settings\Controller\Adminhtml\Settings\AbstractSettingsPage
Abstract class.
| Kind | Member |
|---|---|
| const | ADMIN_RESOURCE = "Magento_Config::config" |
| protected const | ACTIVE_MENU = "Magento_Config::system_config" |
| protected const | PAGE_CODE = "" |
| const | SETTINGS_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) |
| protected | getPageCode(): 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.
| Kind | Member |
|---|---|
| method | includesTax(): bool |
| method | getConfig(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.
| Kind | Member |
|---|---|
| method | getRates(): array |
| method | getRules(): array |
| method | findRule(string $code): ?Magento\Tax\Api\Data\TaxRuleInterface |
| method | getRuleRateIds(): array |
| method | ratedCountries(): array |
| method | rulesCharging(string $country): array |
| method | customerClassId(): int |
| method | productClassIds(): array |
| method | customerClassNames(): array |
| method | isWholeCountry(Magento\Tax\Api\Data\TaxRateInterface $rate): bool |
| method | saveRate(Magento\Tax\Api\Data\TaxRateInterface $rate): Magento\Tax\Api\Data\TaxRateInterface |
| method | saveRule(Magento\Tax\Api\Data\TaxRuleInterface $rule): Magento\Tax\Api\Data\TaxRuleInterface |
| method | deleteRate(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.
| Kind | Member |
|---|---|
| method | icon(string $name, string $class = ""): string |
| method | idFor(string $name): string |
| method | field(string $name, string $label, string $value, array $options = []): string |
| method | select(string $name, string $label, array $choices, string $value, array $options = []): string |
| method | multiselect(string $name, string $label, array $choices, array $values, array $options = []): string |
| method | toggle(string $name, string $label, bool $checked, array $options = []): string |
Last updated on