134 lines
1.8 KiB
Text
134 lines
1.8 KiB
Text
snippet mcomponent
|
|
<?php
|
|
/**
|
|
* @copyright Copyright 2016 Redbox Digital
|
|
*/
|
|
|
|
use Magento\Framework\Component\ComponentRegistrar;
|
|
|
|
ComponentRegistrar::register(
|
|
ComponentRegistrar::MODULE,
|
|
'$1_$0',
|
|
__DIR__
|
|
);
|
|
|
|
endsnippet
|
|
|
|
snippet mcontroller
|
|
<?php
|
|
|
|
namespace $1\Controller$2;
|
|
|
|
use Magento\Framework\App\Action\Action;
|
|
use Magento\Framework\App\Action\Context;
|
|
use Magento\Framework\Controller\ResultFactory;
|
|
|
|
class $3 extends Action
|
|
{
|
|
/**
|
|
* @var ResultFactory
|
|
*/
|
|
protected $resultFactory;
|
|
|
|
/**
|
|
* @param Context $context
|
|
* @param ResultFactory $resultFactory
|
|
*/
|
|
public function __construct(
|
|
Context $context,
|
|
ResultFactory $resultFactory
|
|
) {
|
|
parent::__construct($context);
|
|
|
|
$this->resultFactory = $resultFactory;
|
|
}
|
|
|
|
/**
|
|
* @return \Magento\Framework\Controller\ResultInterface
|
|
*/
|
|
public function execute()
|
|
{
|
|
$0
|
|
}
|
|
}
|
|
endsnippet
|
|
|
|
snippet mblock
|
|
<?php
|
|
|
|
namespace $1\Block;
|
|
|
|
use Magento\Framework\View\Element\Template;
|
|
use Magento\Framework\View\Element\Template\Context;
|
|
|
|
class $2 extends Template
|
|
{
|
|
/**
|
|
* @param Context $context
|
|
* @param array $data
|
|
*/
|
|
public function __construct(
|
|
Context $context,
|
|
array $data = []
|
|
) {
|
|
parent::__construct($context, $data);
|
|
}
|
|
}
|
|
endsnippet
|
|
|
|
snippet mtest
|
|
<?php
|
|
|
|
namespace $1\Test\\$2;
|
|
|
|
class $3Test extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function test$4()
|
|
{
|
|
$0
|
|
}
|
|
}
|
|
endsnippet
|
|
|
|
snippet mclass
|
|
<?php
|
|
|
|
namespace $1;
|
|
|
|
class $2
|
|
{
|
|
$0
|
|
}
|
|
endsnippet
|
|
|
|
snippet minterface
|
|
<?php
|
|
|
|
namespace $1;
|
|
|
|
interface $2
|
|
{
|
|
$0
|
|
}
|
|
endsnippet
|
|
|
|
snippet pubf
|
|
public function $1($2)
|
|
{
|
|
$0
|
|
}
|
|
endsnippet
|
|
|
|
snippet prof
|
|
public function $1($2)
|
|
{
|
|
$0
|
|
}
|
|
endsnippet
|
|
|
|
snippet prif
|
|
private function $1($2)
|
|
{
|
|
$0
|
|
}
|
|
endsnippet
|