This repository has been archived by the owner on Aug 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from blopa/develop
Develop
- Loading branch information
Showing
53 changed files
with
2,338 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
Magento2/app/code/Werules/Chatbot/Api/Data/PromotionalMessagesInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?php | ||
/** | ||
* Magento Chatbot Integration | ||
* Copyright (C) 2017 | ||
* | ||
* This file is part of Werules/Chatbot. | ||
* | ||
* Werules/Chatbot is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Werules\Chatbot\Api\Data; | ||
|
||
interface PromotionalMessagesInterface | ||
{ | ||
|
||
const UPDATED_AT = 'updated_at'; | ||
const CONTENT = 'content'; | ||
const CREATED_AT = 'created_at'; | ||
const STATUS = 'status'; | ||
const PROMOTIONALMESSAGES_ID = 'promotionalmessages_id'; | ||
|
||
|
||
/** | ||
* Get promotionalmessages_id | ||
* @return string|null | ||
*/ | ||
public function getPromotionalmessagesId(); | ||
|
||
/** | ||
* Set promotionalmessages_id | ||
* @param string $promotionalmessages_id | ||
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface | ||
*/ | ||
public function setPromotionalmessagesId($promotionalmessagesId); | ||
|
||
/** | ||
* Get content | ||
* @return string|null | ||
*/ | ||
public function getContent(); | ||
|
||
/** | ||
* Set content | ||
* @param string $content | ||
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface | ||
*/ | ||
public function setContent($content); | ||
|
||
/** | ||
* Get created_at | ||
* @return string|null | ||
*/ | ||
public function getCreatedAt(); | ||
|
||
/** | ||
* Set created_at | ||
* @param string $created_at | ||
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface | ||
*/ | ||
public function setCreatedAt($created_at); | ||
|
||
/** | ||
* Get updated_at | ||
* @return string|null | ||
*/ | ||
public function getUpdatedAt(); | ||
|
||
/** | ||
* Set updated_at | ||
* @param string $updated_at | ||
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface | ||
*/ | ||
public function setUpdatedAt($updated_at); | ||
|
||
/** | ||
* Get status | ||
* @return string|null | ||
*/ | ||
public function getStatus(); | ||
|
||
/** | ||
* Set status | ||
* @param string $status | ||
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface | ||
*/ | ||
public function setStatus($status); | ||
} |
40 changes: 40 additions & 0 deletions
40
Magento2/app/code/Werules/Chatbot/Api/Data/PromotionalMessagesSearchResultsInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* Magento Chatbot Integration | ||
* Copyright (C) 2017 | ||
* | ||
* This file is part of Werules/Chatbot. | ||
* | ||
* Werules/Chatbot is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Werules\Chatbot\Api\Data; | ||
|
||
interface PromotionalMessagesSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface | ||
{ | ||
|
||
|
||
/** | ||
* Get PromotionalMessages list. | ||
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface[] | ||
*/ | ||
public function getItems(); | ||
|
||
/** | ||
* Set content list. | ||
* @param \Werules\Chatbot\Api\Data\PromotionalMessagesInterface[] $items | ||
* @return $this | ||
*/ | ||
public function setItems(array $items); | ||
} |
76 changes: 76 additions & 0 deletions
76
Magento2/app/code/Werules/Chatbot/Api/PromotionalMessagesRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?php | ||
/** | ||
* Magento Chatbot Integration | ||
* Copyright (C) 2017 | ||
* | ||
* This file is part of Werules/Chatbot. | ||
* | ||
* Werules/Chatbot is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Werules\Chatbot\Api; | ||
|
||
use Magento\Framework\Api\SearchCriteriaInterface; | ||
|
||
interface PromotionalMessagesRepositoryInterface | ||
{ | ||
|
||
|
||
/** | ||
* Save PromotionalMessages | ||
* @param \Werules\Chatbot\Api\Data\PromotionalMessagesInterface $promotionalMessages | ||
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface | ||
* @throws \Magento\Framework\Exception\LocalizedException | ||
*/ | ||
public function save( | ||
\Werules\Chatbot\Api\Data\PromotionalMessagesInterface $promotionalMessages | ||
); | ||
|
||
/** | ||
* Retrieve PromotionalMessages | ||
* @param string $promotionalmessagesId | ||
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesInterface | ||
* @throws \Magento\Framework\Exception\LocalizedException | ||
*/ | ||
public function getById($promotionalmessagesId); | ||
|
||
/** | ||
* Retrieve PromotionalMessages matching the specified criteria. | ||
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria | ||
* @return \Werules\Chatbot\Api\Data\PromotionalMessagesSearchResultsInterface | ||
* @throws \Magento\Framework\Exception\LocalizedException | ||
*/ | ||
public function getList( | ||
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria | ||
); | ||
|
||
/** | ||
* Delete PromotionalMessages | ||
* @param \Werules\Chatbot\Api\Data\PromotionalMessagesInterface $promotionalMessages | ||
* @return bool true on success | ||
* @throws \Magento\Framework\Exception\LocalizedException | ||
*/ | ||
public function delete( | ||
\Werules\Chatbot\Api\Data\PromotionalMessagesInterface $promotionalMessages | ||
); | ||
|
||
/** | ||
* Delete PromotionalMessages by ID | ||
* @param string $promotionalmessagesId | ||
* @return bool true on success | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException | ||
* @throws \Magento\Framework\Exception\LocalizedException | ||
*/ | ||
public function deleteById($promotionalmessagesId); | ||
} |
51 changes: 51 additions & 0 deletions
51
Magento2/app/code/Werules/Chatbot/Block/Adminhtml/PromotionalMessages/Edit/BackButton.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
/** | ||
* Magento Chatbot Integration | ||
* Copyright (C) 2017 | ||
* | ||
* This file is part of Werules/Chatbot. | ||
* | ||
* Werules/Chatbot is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace Werules\Chatbot\Block\Adminhtml\PromotionalMessages\Edit; | ||
|
||
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface; | ||
|
||
class BackButton extends GenericButton implements ButtonProviderInterface | ||
{ | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getButtonData() | ||
{ | ||
return [ | ||
'label' => __('Back'), | ||
'on_click' => sprintf("location.href = '%s';", $this->getBackUrl()), | ||
'class' => 'back', | ||
'sort_order' => 10 | ||
]; | ||
} | ||
|
||
/** | ||
* Get URL for back (reset) button | ||
* | ||
* @return string | ||
*/ | ||
public function getBackUrl() | ||
{ | ||
return $this->getUrl('*/*/'); | ||
} | ||
} |
Oops, something went wrong.