Skip to content

Commit

Permalink
Update Branding
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav committed Aug 23, 2019
1 parent 11af657 commit 9c6d8cb
Show file tree
Hide file tree
Showing 37 changed files with 119 additions and 88 deletions.
8 changes: 4 additions & 4 deletions Block/System/Webhook.php
@@ -1,6 +1,6 @@
<?php

namespace SweetTooth\Webhook\Block\System;
namespace Fomo\Webhook\Block\System;

/**
* Webhook Block
Expand All @@ -14,10 +14,10 @@ class Webhook extends \Magento\Backend\Block\Widget\Grid\Container
*/
protected function _construct()
{
$this->_blockGroup = 'SweetTooth_Webhook';
$this->_blockGroup = 'Fomo_Webhook';
$this->_controller = 'system_webhook';
$this->_headerText = __('Webhooks');
$this->_headerText = __('Fomo Webhooks');
parent::_construct();
$this->buttonList->update('add', 'label', __('Add New Webhook'));
$this->buttonList->update('add', 'label', __('Add New Fomo Webhook'));
}
}
8 changes: 4 additions & 4 deletions Block/System/Webhook/Edit.php
@@ -1,6 +1,6 @@
<?php

namespace SweetTooth\Webhook\Block\System\Webhook;
namespace Fomo\Webhook\Block\System\Webhook;

/**
* Webhook Edit Container
Expand Down Expand Up @@ -36,7 +36,7 @@ public function __construct(
protected function _construct()
{
$this->_objectId = 'webhook_id';
$this->_blockGroup = 'SweetTooth_Webhook';
$this->_blockGroup = 'Fomo_Webhook';
$this->_controller = 'system_webhook';

parent::_construct();
Expand All @@ -45,7 +45,7 @@ protected function _construct()
/**
* Getter
*
* @return \SweetTooth\Webhook\Model\Webhook
* @return \Fomo\Webhook\Model\Webhook
*/
public function getWebhook()
{
Expand Down Expand Up @@ -101,7 +101,7 @@ public function getHeaderText()
if ($this->getWebhook()->getId()) {
return __('Webhook "%1"', $this->escapeHtml($this->getWebhook()->getName()));
} else {
return __('New Webhook');
return __('New Fomo Webhook');
}
}

Expand Down
6 changes: 3 additions & 3 deletions Block/System/Webhook/Edit/Form.php
Expand Up @@ -3,14 +3,14 @@
/**
* Webhook Edit Form
*/
namespace SweetTooth\Webhook\Block\System\Webhook\Edit;
namespace Fomo\Webhook\Block\System\Webhook\Edit;

class Form extends \Magento\Backend\Block\Widget\Form\Generic
{
/**
* Getter
*
* @return \SweetTooth\Webhook\Model\Webhook
* @return \Fomo\Webhook\Model\Webhook
*/
public function getWebhook()
{
Expand All @@ -20,7 +20,7 @@ public function getWebhook()
/**
* Prepare form before rendering HTML
*
* @return \SweetTooth\Webhook\Block\System\Webhook\Edit\Form
* @return \Fomo\Webhook\Block\System\Webhook\Edit\Form
*/
protected function _prepareForm()
{
Expand Down
16 changes: 8 additions & 8 deletions Controller/Adminhtml/System/Webhook.php
@@ -1,6 +1,6 @@
<?php

namespace SweetTooth\Webhook\Controller\Adminhtml\System;
namespace Fomo\Webhook\Controller\Adminhtml\System;

use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
Expand All @@ -14,7 +14,7 @@
*/
abstract class Webhook extends Action
{
const ADMIN_RESOURCE = 'SweetTooth_Webhook::webhook';
const ADMIN_RESOURCE = 'Fomo_Webhook::webhook';
/**
* Core registry
*
Expand Down Expand Up @@ -77,22 +77,22 @@ protected function createPage()
{
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->setActiveMenu('SweetTooth_Webhook::system_webhook')
->addBreadcrumb(__('Webhooks'), __('Webhooks'));
$resultPage->setActiveMenu('Fomo_Webhook::system_webhook')
->addBreadcrumb(__('Fomo Webhooks'), __('Fomo Webhooks'));
return $resultPage;
}

/**
* Initialize Webhook object
*
* @return \SweetTooth\Webhook\Model\Webhook
* @return \Fomo\Webhook\Model\Webhook
*/
protected function _initWebhook()
{
$webhookId = $this->getRequest()->getParam('webhook_id', null);
$storeId = (int)$this->getRequest()->getParam('store', 0);
/* @var $webhook \SweetTooth\Webhook\Model\Webhook */
$webhook = $this->_objectManager->create('SweetTooth\Webhook\Model\Webhook');
/* @var $webhook \Fomo\Webhook\Model\Webhook */
$webhook = $this->_objectManager->create('Fomo\Webhook\Model\Webhook');
if ($webhookId) {
$webhook->setStoreId($storeId)->load($webhookId);
}
Expand All @@ -107,6 +107,6 @@ protected function _initWebhook()
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('SweetTooth_Webhook::webhook');
return $this->_authorization->isAllowed('Fomo_Webhook::webhook');
}
}
4 changes: 2 additions & 2 deletions Controller/Adminhtml/System/Webhook/Delete.php
@@ -1,8 +1,8 @@
<?php

namespace SweetTooth\Webhook\Controller\Adminhtml\System\Webhook;
namespace Fomo\Webhook\Controller\Adminhtml\System\Webhook;

class Delete extends \SweetTooth\Webhook\Controller\Adminhtml\System\Webhook
class Delete extends \Fomo\Webhook\Controller\Adminhtml\System\Webhook
{
/**
* Delete Action
Expand Down
12 changes: 6 additions & 6 deletions Controller/Adminhtml/System/Webhook/Edit.php
@@ -1,8 +1,8 @@
<?php

namespace SweetTooth\Webhook\Controller\Adminhtml\System\Webhook;
namespace Fomo\Webhook\Controller\Adminhtml\System\Webhook;

class Edit extends \SweetTooth\Webhook\Controller\Adminhtml\System\Webhook
class Edit extends \Fomo\Webhook\Controller\Adminhtml\System\Webhook
{
/**
* Edit Action
Expand All @@ -14,16 +14,16 @@ public function execute()
$webhook = $this->_initWebhook();

$resultPage = $this->createPage();
$resultPage->getConfig()->getTitle()->prepend(__('Webhooks'));
$resultPage->getConfig()->getTitle()->prepend(__('Fomo Webhooks'));
$resultPage->getConfig()->getTitle()->prepend(
$webhook->getId() ? $webhook->getCode() : __('New Webhook')
$webhook->getId() ? $webhook->getCode() : __('New Fomo Webhook')
);
$resultPage->addContent($resultPage->getLayout()->createBlock('SweetTooth\Webhook\Block\System\Webhook\Edit'))
$resultPage->addContent($resultPage->getLayout()->createBlock('Fomo\Webhook\Block\System\Webhook\Edit'))
->addJs(
$resultPage->getLayout()->createBlock(
'Magento\Framework\View\Element\Template',
'',
['data' => ['template' => 'SweetTooth_Webhook::system/webhook/js.phtml']]
['data' => ['template' => 'Fomo_Webhook::system/webhook/js.phtml']]
)
);
return $resultPage;
Expand Down
6 changes: 3 additions & 3 deletions Controller/Adminhtml/System/Webhook/Index.php
@@ -1,9 +1,9 @@
<?php

namespace SweetTooth\Webhook\Controller\Adminhtml\System\Webhook;
namespace Fomo\Webhook\Controller\Adminhtml\System\Webhook;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Index extends \SweetTooth\Webhook\Controller\Adminhtml\System\Webhook
class Index extends \Fomo\Webhook\Controller\Adminhtml\System\Webhook
{
/**
* Index Action
Expand All @@ -13,7 +13,7 @@ class Index extends \SweetTooth\Webhook\Controller\Adminhtml\System\Webhook
public function execute()
{
$resultPage = $this->createPage();
$resultPage->getConfig()->getTitle()->prepend(__('Webhooks'));
$resultPage->getConfig()->getTitle()->prepend(__('Fomo Webhooks'));
return $resultPage;
}
}
4 changes: 2 additions & 2 deletions Controller/Adminhtml/System/Webhook/NewAction.php
@@ -1,8 +1,8 @@
<?php

namespace SweetTooth\Webhook\Controller\Adminhtml\System\Webhook;
namespace Fomo\Webhook\Controller\Adminhtml\System\Webhook;

class NewAction extends \SweetTooth\Webhook\Controller\Adminhtml\System\Webhook
class NewAction extends \Fomo\Webhook\Controller\Adminhtml\System\Webhook
{
/**
* New Action (forward to edit action)
Expand Down
4 changes: 2 additions & 2 deletions Controller/Adminhtml/System/Webhook/Save.php
@@ -1,9 +1,9 @@
<?php

namespace SweetTooth\Webhook\Controller\Adminhtml\System\Webhook;
namespace Fomo\Webhook\Controller\Adminhtml\System\Webhook;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Save extends \SweetTooth\Webhook\Controller\Adminhtml\System\Webhook
class Save extends \Fomo\Webhook\Controller\Adminhtml\System\Webhook
{
/**
* Save Action
Expand Down
4 changes: 2 additions & 2 deletions Controller/Adminhtml/System/Webhook/Validate.php
@@ -1,8 +1,8 @@
<?php

namespace SweetTooth\Webhook\Controller\Adminhtml\System\Webhook;
namespace Fomo\Webhook\Controller\Adminhtml\System\Webhook;

class Validate extends \SweetTooth\Webhook\Controller\Adminhtml\System\Webhook
class Validate extends \Fomo\Webhook\Controller\Adminhtml\System\Webhook
{
/**
* Validate Action
Expand Down
4 changes: 2 additions & 2 deletions Model/Observer/Customer/Delete.php
@@ -1,13 +1,13 @@
<?php

namespace SweetTooth\Webhook\Model\Observer\Customer;
namespace Fomo\Webhook\Model\Observer\Customer;

use Magento\Framework\Event\Observer;

/**
* Class Customer
*/
class Delete extends \SweetTooth\Webhook\Model\Observer\WebhookAbstract
class Delete extends \Fomo\Webhook\Model\Observer\WebhookAbstract
{
protected function _getWebhookEvent()
{
Expand Down
4 changes: 2 additions & 2 deletions Model/Observer/Customer/Save.php
@@ -1,13 +1,13 @@
<?php

namespace SweetTooth\Webhook\Model\Observer\Customer;
namespace Fomo\Webhook\Model\Observer\Customer;

use Magento\Framework\Event\Observer;

/**
* Class Customer
*/
class Save extends \SweetTooth\Webhook\Model\Observer\WebhookAbstract
class Save extends \Fomo\Webhook\Model\Observer\WebhookAbstract
{
protected function _getWebhookEvent()
{
Expand Down
4 changes: 2 additions & 2 deletions Model/Observer/Order/Delete.php
@@ -1,13 +1,13 @@
<?php

namespace SweetTooth\Webhook\Model\Observer\Order;
namespace Fomo\Webhook\Model\Observer\Order;

use Magento\Framework\Event\Observer;

/**
* Class Customer
*/
class Delete extends \SweetTooth\Webhook\Model\Observer\WebhookAbstract
class Delete extends \Fomo\Webhook\Model\Observer\WebhookAbstract
{
protected function _getWebhookEvent()
{
Expand Down
4 changes: 2 additions & 2 deletions Model/Observer/Order/OrderDataPronto.php
@@ -1,6 +1,6 @@
<?php

namespace SweetTooth\Webhook\Model\Observer\Order;
namespace Fomo\Webhook\Model\Observer\Order;

use Magento\Framework\Event\Observer;

Expand Down Expand Up @@ -34,7 +34,7 @@ public function __construct(
\Psr\Log\LoggerInterface $logger,
\Magento\Framework\HTTP\Adapter\Curl $curlAdapter,
\Magento\Framework\Json\Helper\Data $jsonHelper,
\SweetTooth\Webhook\Model\WebhookFactory $webhookFactory
\Fomo\Webhook\Model\WebhookFactory $webhookFactory
) {
$this->_logger = $logger;
$this->_curlAdapter = $curlAdapter;
Expand Down
2 changes: 1 addition & 1 deletion Model/Observer/Order/Place.php--
Expand Up @@ -33,7 +33,7 @@ class OrderDataPlace implements \Magento\Framework\Event\ObserverInterface
\Psr\Log\LoggerInterface $logger,
\Magento\Framework\HTTP\Adapter\Curl $curlAdapter,
\Magento\Framework\Json\Helper\Data $jsonHelper,
\SweetTooth\Webhook\Model\WebhookFactory $webhookFactory
\Fomo\Webhook\Model\WebhookFactory $webhookFactory
) {
$this->_logger = $logger;
$this->_curlAdapter = $curlAdapter;
Expand Down
4 changes: 2 additions & 2 deletions Model/Observer/Order/Save.php
@@ -1,13 +1,13 @@
<?php

namespace SweetTooth\Webhook\Model\Observer\Order;
namespace Fomo\Webhook\Model\Observer\Order;

use Magento\Framework\Event\Observer;

/**
* Class Customer
*/
class Save extends \SweetTooth\Webhook\Model\Observer\WebhookAbstract
class Save extends \Fomo\Webhook\Model\Observer\WebhookAbstract
{
protected function _getWebhookEvent()
{
Expand Down
4 changes: 2 additions & 2 deletions Model/Observer/Product/Delete.php
@@ -1,13 +1,13 @@
<?php

namespace SweetTooth\Webhook\Model\Observer\Product;
namespace Fomo\Webhook\Model\Observer\Product;

use Magento\Framework\Event\Observer;

/**
* Class Customer
*/
class Delete extends \SweetTooth\Webhook\Model\Observer\WebhookAbstract
class Delete extends \Fomo\Webhook\Model\Observer\WebhookAbstract
{
protected function _getWebhookEvent()
{
Expand Down
4 changes: 2 additions & 2 deletions Model/Observer/Product/Save.php
@@ -1,6 +1,6 @@
<?php

namespace SweetTooth\Webhook\Model\Observer\Product;
namespace Fomo\Webhook\Model\Observer\Product;

use Magento\Framework\Event\Observer;

Expand Down Expand Up @@ -35,7 +35,7 @@ public function __construct(
\Psr\Log\LoggerInterface $logger,
\Magento\Framework\HTTP\Adapter\Curl $curlAdapter,
\Magento\Framework\Json\Helper\Data $jsonHelper,
\SweetTooth\Webhook\Model\WebhookFactory $webhookFactory
\Fomo\Webhook\Model\WebhookFactory $webhookFactory
) {
$this->_logger = $logger;
$this->_curlAdapter = $curlAdapter;
Expand Down
4 changes: 2 additions & 2 deletions Model/Observer/WebhookAbstract.php
@@ -1,6 +1,6 @@
<?php

namespace SweetTooth\Webhook\Model\Observer;
namespace Fomo\Webhook\Model\Observer;

use Magento\Framework\Event\Observer;

Expand Down Expand Up @@ -38,7 +38,7 @@ public function __construct(
\Psr\Log\LoggerInterface $logger,
\Magento\Framework\HTTP\Adapter\Curl $curlAdapter,
\Magento\Framework\Json\Helper\Data $jsonHelper,
\SweetTooth\Webhook\Model\WebhookFactory $webhookFactory
\Fomo\Webhook\Model\WebhookFactory $webhookFactory
) {
$this->_logger = $logger;
$this->_curlAdapter = $curlAdapter;
Expand Down
6 changes: 3 additions & 3 deletions Model/Resource/Webhook.php
@@ -1,6 +1,6 @@
<?php

namespace SweetTooth\Webhook\Model\Resource;
namespace Fomo\Webhook\Model\Resource;

/**
* Custom webhook resource model
Expand All @@ -20,11 +20,11 @@ protected function _construct()
/**
* Load webhook by code
*
* @param \SweetTooth\Webhook\Model\Webhook $object
* @param \Fomo\Webhook\Model\Webhook $object
* @param string $code
* @return $this
*/
public function loadByCode(\SweetTooth\Webhook\Model\Webhook $object, $code)
public function loadByCode(\Fomo\Webhook\Model\Webhook $object, $code)
{
if ($result = $this->getWebhookByCode($code, true, $object->getStoreId())) {
$object->setData($result);
Expand Down

0 comments on commit 9c6d8cb

Please sign in to comment.