Skip to content

Commit

Permalink
magento-2 plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
amarpanday committed Jan 4, 2019
1 parent 9ee4d44 commit 7e32d8b
Show file tree
Hide file tree
Showing 64 changed files with 11,009 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
36 changes: 36 additions & 0 deletions Block/Adminhtml/SendinblueBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
namespace Sendinblue\Sendinblue\Block\Adminhtml;

use Magento\Backend\Block\Template;
//use Sendinblue\Sendinblue\Helper\ConfigHelper;
//use Sendinblue\Sendinblue\Model\AdminSample;

class SendinblueBlock extends Template
{
protected $_config;
protected $_adminSampleModel;

/**
* @param Context $context
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
array $data = []
) {
parent::__construct($context, $data);
}

public function getDataDb()
{
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$dbConfig = $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface');
return $dbConfig;
}
public function getFormValue()
{
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$FormKey = $objectManager->get('Magento\Framework\Data\Form\FormKey');
return $FormKey->getFormKey();
}
}
36 changes: 36 additions & 0 deletions Block/Sib.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
namespace Sendinblue\Sendinblue\Block;

//use Sendinblue\Sendinblue\Helper\ConfigHelper;
//use Sendinblue\Sendinblue\Model\AdminSample;

class Sib extends \Magento\Framework\View\Element\Template
{
protected $_config;
protected $_adminSampleModel;

/**
* @param Context $context
* @param array $data
*/
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
array $data = []
) {
parent::__construct($context, $data);
}

public function getDataDb()
{
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$dbConfig = $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface');
return $dbConfig;
}
public function getFormValue()
{
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$FormKey = $objectManager->get('Magento\Framework\Data\Form\FormKey');
return $FormKey->getFormKey();
}

}
37 changes: 37 additions & 0 deletions Controller/Adminhtml/Sib/Index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
namespace Sendinblue\Sendinblue\Controller\Adminhtml\Sib;

class Index extends \Magento\Backend\App\Action
{
/**
* @var \Magento\Framework\View\Result\PageFactory
*/
protected $resultPageFactory;

/**
* Constructor
*
* @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
*/
public function __construct(
\Magento\Backend\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
parent::__construct($context);
$this->resultPageFactory = $resultPageFactory;
}

/**
* Load the page defined in view/adminhtml/layout/exampleadminnewpage_helloworld_index.xml
*
* @return \Magento\Framework\View\Result\Page
*/
public function execute()
{
$resultPage = $this->resultPageFactory->create();

return $resultPage;
}
}

Loading

0 comments on commit 7e32d8b

Please sign in to comment.