Skip to content

Commit

Permalink
MAGETWO-33629: creation of m2-sample-webapi-client
Browse files Browse the repository at this point in the history
- MAGETWO-35113: Implemantation
  • Loading branch information
Maksym Aposov committed Apr 9, 2015
1 parent a8924c7 commit cec6522
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
15 changes: 9 additions & 6 deletions sample-module-webapi-client/Controller/Index/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,30 @@
namespace Magento\SampleWebapiClient\Controller\Index;

use Magento\Framework\App\Action\Context;
use Magento\Framework\App\Action\Action;
use Magento\Framework\View\Result\Page;
use Magento\Framework\View\Result\PageFactory;

/**
* Loads the demo page.
*
* This is a basic controller that only loads the corresponding layout file. It may duplicate other such

* controllers, and thus it is considered tech debt. This code duplication will be resolved in future releases.
*/
class Index extends \Magento\Framework\App\Action\Action
class Index extends Action
{
/**
* @var \Magento\Framework\View\Result\PageFactory
* @var PageFactory
*/
private $resultPageFactory;

/**
* @param Context $context
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
* @param PageFactory $resultPageFactory
*/
public function __construct(
Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory
PageFactory $resultPageFactory
) {
parent::__construct($context);
$this->resultPageFactory = $resultPageFactory;
Expand All @@ -35,10 +38,10 @@ public function __construct(
/**
* Index action
*
* @return \Magento\Framework\View\Result\Page
* @return Page
*/
public function execute()
{
return $this->resultPageFactory->create();
}
}
}
2 changes: 1 addition & 1 deletion sample-module-webapi-client/etc/frontend/routes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
<module name="Magento_SampleWebapiClient" />
</route>
</router>
</config>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ var config = {
sampleWebapi: 'Magento_SampleWebapiClient/js/web-api-client'
}
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
</table>
<% } else { %>
<p><%- window.jQuery.mage.__('No items found.') %></p>
<% } %>
<% } %>
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ define([
})

return $.mage.sampleWebapi;
});
});

0 comments on commit cec6522

Please sign in to comment.