Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
CategoryWidgetRepositoryInterface.php 1.94 KiB
Newer Older
Nicolas's avatar
Nicolas committed
<?php
namespace NicolasBejean\CategoryWidget\Api;

/**
 * Interface CategoryWidgetRepositoryInterface
 *
 * @category PHP
 * @package  NicolasBejean\CategoryWidget\Api
 * @author   Nicolas Béjean <nicolas@bejean.eu>
 * @license  https://github.com/nicolasbejean/category-widget/blob/master/licence.txt BSD Licence
 * @link     https://www.bejean.eu
 */
interface CategoryWidgetRepositoryInterface
{
    /**
     * Save Category Widget
     *
     * @param \NicolasBejean\CategoryWidget\Api\Data\CategoryWidgetInterface $imageSlider
     * @return \NicolasBejean\CategoryWidget\Api\Data\CategoryWidgetInterface
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function save(Data\CategoryWidgetInterface $imageSlider);

    /**
     * Get Category Widget by ID
     *
     * @param int $id
     * @return \NicolasBejean\CategoryWidget\Api\Data\CategoryWidgetInterface
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function getById($id);

    /**
     * Get Category Widget by list
     *
     * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
     * @return \NicolasBejean\CategoryWidget\Api\Data\CategoryWidgetSearchResultsInterface
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);

    /**
     * Delete Category Widget
     *
     * @param \NicolasBejean\CategoryWidget\Api\Data\CategoryWidgetInterface $imageSlider
     * @return bool true on success
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function delete(Data\CategoryWidgetInterface $imageSlider);

    /**
     * Delete Category Widget by ID
     *
     * @param int $id
     * @return bool true on success
     * @throws \Magento\Framework\Exception\NoSuchEntityException
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function deleteById($id);
}