PageRepositoryInterface.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Cms\Api;
  7. use Magento\Framework\Api\SearchCriteriaInterface;
  8. /**
  9. * CMS page CRUD interface.
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface PageRepositoryInterface
  14. {
  15. /**
  16. * Save page.
  17. *
  18. * @param \Magento\Cms\Api\Data\PageInterface $page
  19. * @return \Magento\Cms\Api\Data\PageInterface
  20. * @throws \Magento\Framework\Exception\LocalizedException
  21. */
  22. public function save(\Magento\Cms\Api\Data\PageInterface $page);
  23. /**
  24. * Retrieve page.
  25. *
  26. * @param int $pageId
  27. * @return \Magento\Cms\Api\Data\PageInterface
  28. * @throws \Magento\Framework\Exception\LocalizedException
  29. */
  30. public function getById($pageId);
  31. /**
  32. * Retrieve pages matching the specified criteria.
  33. *
  34. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
  35. * @return \Magento\Cms\Api\Data\PageSearchResultsInterface
  36. * @throws \Magento\Framework\Exception\LocalizedException
  37. */
  38. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  39. /**
  40. * Delete page.
  41. *
  42. * @param \Magento\Cms\Api\Data\PageInterface $page
  43. * @return bool true on success
  44. * @throws \Magento\Framework\Exception\LocalizedException
  45. */
  46. public function delete(\Magento\Cms\Api\Data\PageInterface $page);
  47. /**
  48. * Delete page by ID.
  49. *
  50. * @param int $pageId
  51. * @return bool true on success
  52. * @throws \Magento\Framework\Exception\NoSuchEntityException
  53. * @throws \Magento\Framework\Exception\LocalizedException
  54. */
  55. public function deleteById($pageId);
  56. }