-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmg-new-block.sublime-snippet
More file actions
executable file
·41 lines (36 loc) · 1003 Bytes
/
Copy pathmg-new-block.sublime-snippet
File metadata and controls
executable file
·41 lines (36 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<snippet>
<content><![CDATA[
namespace ${1:${TM_FILEPATH/(?:.*vendor\/)|(\/)?([^\/]+)(?=\/)|(?:\/[^\/]+\.php$)/(?1:\\$^N:$^N)/g}};
use Magento\Framework\View\Element\Template;
/**
* ${2:${TM_FILENAME/(.+)\..+|.*/$1/:name}}
*/
class ${2:${TM_FILENAME/(.+)\..+|.*/$1/:name}} extends Template
{
/**
* ${2:${TM_FILENAME/(.+)\..+|.*/$1/:name}} constructor
*
* @param Template\Context $context
* @param array $data
*/
public function __construct(
Context \$context,
array \$data = []
) {
parent::__construct(\$context, \$data);
}
/**
* ${3:methodName} description
*
* @return ${6:}
*/
public function ${3:methodName}(${4:}){
${5:}
}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>mg-block</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>