PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 6, 2024
Let's talk code, commerce and open source.

CmsPageCategory domain

CmsPageCategory Commands

AddCmsPageCategoryCommand

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Command\AddCmsPageCategoryCommand Class AddCmsPageCategoryCommand is responsible for adding cms page category.

Command details
Constructor parameters
  • $array $localisedName
  • $array $localisedFriendlyUrl
  • $int $parentId
  • $bool $isDisplayed
Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\CommandHandler\AddCmsPageCategoryHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\CommandHandler\AddCmsPageCategoryHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\ValueObject\CmsPageCategoryId

BulkDeleteCmsPageCategoryCommand

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Command\BulkDeleteCmsPageCategoryCommand Class BulkDeleteCmsPageCategoryCommand is responsible for deleting multiple cms page categories.

Command details
Constructor parameters
  • $array $cmsPageCategoryIds
Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\CommandHandler\BulkDeleteCmsPageCategoryHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\CommandHandler\BulkDeleteCmsPageCategoryHandlerInterface
Return type void

BulkDisableCmsPageCategoryCommand

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Command\BulkDisableCmsPageCategoryCommand Class BulkDisableCmsPageCategoryCommand is responsible for disabling cms category pages.

Command details
Constructor parameters
  • $array $cmsPageCategoryIds
Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\CommandHandler\BulkDisableCmsPageCategoryHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\CommandHandler\BulkDisableCmsPageCategoryHandlerInterface
Return type void

BulkEnableCmsPageCategoryCommand

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Command\BulkEnableCmsPageCategoryCommand Class BulkEnableCmsPageCategoryCommand is responsible for enabling cms category pages.

Command details
Constructor parameters
  • $array $cmsPageCategoryIds
Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\CommandHandler\BulkEnableCmsPageCategoryHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\CommandHandler\BulkEnableCmsPageCategoryHandlerInterface
Return type void

DeleteCmsPageCategoryCommand

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Command\DeleteCmsPageCategoryCommand Class DeleteCmsPageCategoryCommand is responsible for deleting cms page category.

Command details
Constructor parameters
  • $int $cmsPageCategoryId
Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\CommandHandler\DeleteCmsPageCategoryHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\CommandHandler\DeleteCmsPageCategoryHandlerInterface
Return type void

EditCmsPageCategoryCommand

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Command\EditCmsPageCategoryCommand Edits cms page category.

Command details
Constructor parameters
  • $int $cmsPageCategoryId
Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\CommandHandler\EditCmsPageCategoryHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\CommandHandler\EditCmsPageCategoryHandlerInterface
Return type void

ToggleCmsPageCategoryStatusCommand

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Command\ToggleCmsPageCategoryStatusCommand Class ToggleCmsPageCategoryStatusCommand is responsible for turning on and off cms page category status.

Command details
Constructor parameters
  • $int $cmsPageCategoryId
Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\CommandHandler\ToggleCmsPageCategoryStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\CommandHandler\ToggleCmsPageCategoryStatusHandlerInterface
Return type void

CmsPageCategory Queries

GetCmsPageCategoriesForBreadcrumb

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Query\GetCmsPageCategoriesForBreadcrumb Class GetCmsPageCategoriesForBreadcrumb is responsible for providing required data for displaying cms page category breadcrumbs.

Query details
Constructor parameters
  • $int $currentCategoryId
Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\QueryHandler\GetCmsPageCategoriesForBreadcrumbHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\QueryHandler\GetCmsPageCategoriesForBreadcrumbHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\QueryResult\Breadcrumb

GetCmsPageCategoryForEditing

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Query\GetCmsPageCategoryForEditing Class GetCmsPageCategoryForEditing is responsible for retrieving cms page category form data.

Query details
Constructor parameters
  • $int $cmsPageCategoryId
Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\QueryHandler\GetCmsPageCategoryForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\QueryHandler\GetCmsPageCategoryForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\QueryResult\EditableCmsPageCategory

GetCmsPageCategoryNameForListing

PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Query\GetCmsPageCategoryNameForListing Gets name by cms category which are used for display in cms listing.

Query details
Constructor parameters
    Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\QueryHandler\GetCmsPageCategoryNameForListingHandler

    Implements:

    • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\QueryHandler\GetCmsPageCategoryNameForListingHandlerInterface
    Return type string

    GetCmsPageParentCategoryIdForRedirection

    PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\Query\GetCmsPageParentCategoryIdForRedirection Class GetCmsPageParentCategoryIdForRedirection is responsible for providing cms page categories parent id for redirecting to the right controller after create, edit, delete, toggle actions.

    Query details
    Constructor parameters
    • $int $cmsPageCategoryId
    Handler class PrestaShop\PrestaShop\Adapter\CMS\PageCategory\QueryHandler\GetCmsPageParentCategoryIdForRedirectionHandler

    Implements:

    • PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\QueryHandler\GetCmsPageParentCategoryIdForRedirectionHandlerInterface
    Return type PrestaShop\PrestaShop\Core\Domain\CmsPageCategory\ValueObject\CmsPageCategoryId