-
Notifications
You must be signed in to change notification settings - Fork 0
/
eclipse_php_snippets.xml
239 lines (221 loc) · 14.5 KB
/
eclipse_php_snippets.xml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="deb">Zend_Debug::dump(</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_admin_grid_container">class ${Vendor}_${Module}_Block_Adminhtml_${Block} extends Mage_Adminhtml_Block_Widget_Grid_Container
{
public function __construct()
{
$$this->_blockGroup = '${modulealias}';
$$this->_controller = 'adminhtml_${block_alias}';
$$this->_headerText = Mage::helper('${modulealias}')->__('${Title}');
parent::__construct();
}
}
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_model">class ${Vendor}_${Module}_Model_${Model} extends Mage_Catalog_Model_Abstract
{
/**
* Model event prefix
*
* @var string
*/
protected $$_eventPrefix = '${model}';
/**
* Name of the event object
*
* @var string
*/
protected $$_eventObject = '${model}';
protected function _construct()
{
$$this->_init('${modulealias}/${model}');
}
}
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_model_mysql4">class ${Vendor}_${Module}_Model_Mysql4_${Model} extends Mage_Core_Model_Mysql4_Abstract
{
protected function _construct()
{
$$this->_init('${modulealias}/${model}', '${model}_id');
}
}
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_model_mysql4_collection">class ${Vendor}_${Module}_Model_Mysql4_${Model}_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
{
protected $$_storeId;
public function _construct()
{
$$this->_init('${modulealias}/${model}');
}
/**
* @param int $$storeId
* @return ${Vendor}_${Module}_Model_Mysql4_${Model}_Collectio
*/
public function setStoreId($$storeId)
{
$$this->_storeId = $$storeId;
return $$this;
}
}
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_setup">/* @var $$installer Mage_Core_Model_Resource_Setup */
$$installer = $$this;
$$installer->startSetup();
//${setup}
$$installer->endSetup();</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_setup_eav">/* @var $$installer Mage_Eav_Model_Entity_Setup */
$$installer = $$this;
/* @var $$eavConfig Mage_Eav_Model_Config */
$$eavConfig = Mage::getModel('eav/config');
$$installer->startSetup();
//${setup}
$$installer->endSetup();</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_setup_eav_addAttribute">$$newAttributes['${customer__customer_address__catalog_category__catalog_product__order__invoice__creditmemo__shipment__rma_item}']['${attribute_code}'] = $$eavConfig->getAttribute('${customer__customer_address__catalog_category__catalog_product__order__invoice__creditmemo__shipment__rma_item}', '${attribute_code}');
if (empty($$newAttributes['${customer__customer_address__catalog_category__catalog_product__order__invoice__creditmemo__shipment__rma_item}']['${attribute_code}']) || !$$newAttributes['${customer__customer_address__catalog_category__catalog_product__order__invoice__creditmemo__shipment__rma_item}']['${attribute_code}']->getId())
{
$$installer->addAttribute('${customer__customer_address__catalog_category__catalog_product__order__invoice__creditmemo__shipment__rma_item}', '${attribute_code}', array(
'type' => '${int_static_varchar_datetime_text_decimal}', // backend_type
'input' => '${select_text_date_hidden}', // frontend_input
'label' => '${Label}',
'required' => 1, // is_required
'default' => null, // is_default
'user_defined' => 0, // is_user_defined
'source' => null, // source_model use 'eav/entity_attribute_source_table' for select types or 'eav/entity_attribute_source_boolean' for boolean values
'backend' => null, // backend_model
'table' => null, // backend_table
'frontend' => null, // frondend_model
'frontend_class' => null, // frontend_class
'note' => null, // note
//'option' => array('values' => array()), // multiple option values
));
}
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_setup_eav_addAttribute_customer">$$newAttributes['${customer__customer_address}']['${attribute_code}'] = $$eavConfig->getAttribute('${customer__customer_address}', '${attribute_code}');
if (empty($$newAttributes['${customer__customer_address}']['${attribute_code}']) || !$$newAttributes['${customer__customer_address}']['${attribute_code}']->getId())
{
$$installer->addAttribute('${customer__customer_address}', '${attribute_code}', array(
'type' => '${int_static_varchar_datetime_text_decimal}', // backend_type
'input' => '${select_text_date_hidden}', // frontend_input
'label' => '${Label}',
'required' => 1,
'default' => null,
'user_defined' => 0,
'source' => null, // source_model use 'eav/entity_attribute_source_table' for select types or 'eav/entity_attribute_source_boolean' for boolean values
'backend' => null, // backend_model
'table' => null, // backend_table
'frontend' => null, // frondend_model
'frontend_class' => null, // frontend_class
'note' => null, // note
//'option' => array('values' => array()), // multiple option values
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, // is_global
'input_renderer' => null, // frontend_input_renderer
'visible' => 1, // is_visible
'system' => 1, // is_system
'input_filter' => null, // input_filter
'multiline_count' => 0, // multiline_count
'validate_rules' => null, // validate_rules
'data' => null, // data_model
'position' => 0, // position
));
}
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_setup_eav_addAttribute_product">$$newAttributes['catalog_product']['${attribute_code}'] = $$eavConfig->getAttribute('catalog_product', '${attribute_code}');
if (empty($$newAttributes['catalog_product']['${attribute_code}']) || !$$newAttributes['catalog_product']['${attribute_code}']->getId())
{
$$installer->addAttribute('catalog_product', '${attribute_code}', array(
'type' => '${int_static_varchar_datetime_text_decimal}', // backend_type
'input' => '${select_text_date_hidden}', // frontend_input
'label' => '${Label}',
'required' => 1,
'default' => null,
'user_defined' => 0,
'source' => null, // source_model use 'eav/entity_attribute_source_table' for select types or 'eav/entity_attribute_source_boolean' for boolean values
'backend' => null, // backend_model
'table' => null, // backend_table
'frontend' => null, // frondend_model
'frontend_class' => null, // frontend_class
'note' => null, // note
//'option' => array('values' => array()), // multiple option values
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, // is_global
'input_renderer' => null, // frontend_input_renderer
'visible' => 1, // is_visible
'searchable' => 0, // is_searchable
'filterable' => 0, // is_filterable
'comparable' => 0, // is_comparable
'visible_on_front' => 0, // is_visible_on_front
'wysiwyg_enabled' => 0, // is_wysiwyg_enabled
'is_html_allowed_on_front' => 0, // is_html_allowed_on_front
'visible_in_advanced_search' => 0, // is_visible_in_advanced_search
'filterable_in_search' => 0, // is_filterable_in_search
'used_in_product_listing' => 0, // used_in_product_listing
'used_for_sort_by' => 0, // used_for_sort_by
'apply_to' => '${all_simple_configurable_virtual_grouped_bundle}', // use comma to separate multiple values
'position' => 0, // position
'is_configurable' => 1, // is_configurable
'used_for_promo_rules' => 0, // is_used_for_promo_rules
'group' => null, // Attribute group
));
}
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_setup_eav_addAttribute_product_select">$$newAttributes['catalog_product']['${attribute_code}'] = $$eavConfig->getAttribute('catalog_product', '${attribute_code}');
if (empty($$newAttributes['catalog_product']['${attribute_code}']) || !$$newAttributes['catalog_product']['${attribute_code}']->getId())
{
$$installer->addAttribute('catalog_product', '${attribute_code}', array(
'type' => 'int', // backend_type
'input' => 'select', // frontend_input
'label' => '${Label}',
'required' => 1,
'default' => null,
'user_defined' => 0,
'source' => 'eav/entity_attribute_source_table', // source_model
'backend' => null, // backend_model
'table' => null, // backend_table
'frontend' => null, // frondend_model
'frontend_class' => null, // frontend_class
'note' => null, // note
'option' => array('values' => array(${values})), // multiple option values
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, // is_global
'input_renderer' => null, // frontend_input_renderer
'visible' => 1, // is_visible
'searchable' => 0, // is_searchable
'filterable' => 0, // is_filterable
'comparable' => 0, // is_comparable
'visible_on_front' => 0, // is_visible_on_front
'wysiwyg_enabled' => 0, // is_wysiwyg_enabled
'is_html_allowed_on_front' => 0, // is_html_allowed_on_front
'visible_in_advanced_search' => 0, // is_visible_in_advanced_search
'filterable_in_search' => 0, // is_filterable_in_search
'used_in_product_listing' => 0, // used_in_product_listing
'used_for_sort_by' => 0, // used_for_sort_by
'apply_to' => '${all_simple_configurable_virtual_grouped_bundle}', // use comma to separate multiple values
'position' => 0, // position
'is_configurable' => 1, // is_configurable
'used_for_promo_rules' => 0, // is_used_for_promo_rules
'group' => null, // Attribute group
));
}
</template><template autoinsert="true" context="php" deleted="false" description="" enabled="true" name="mage_setup_eav_addAttribute_product_yesno">$$newAttributes['catalog_product']['${attribute_code}'] = $$eavConfig->getAttribute('catalog_product', '${attribute_code}');
if (empty($$newAttributes['catalog_product']['${attribute_code}']) || !$$newAttributes['catalog_product']['${attribute_code}']->getId())
{
$$installer->addAttribute('catalog_product', '${attribute_code}', array(
'type' => 'int', // backend_type
'input' => 'select', // frontend_input
'label' => '${Label}',
'required' => 0,
'default' => null,
'user_defined' => 0,
'source' => 'eav/entity_attribute_source_boolean', // source_model
'backend' => null, // backend_model
'table' => null, // backend_table
'frontend' => null, // frondend_model
'frontend_class' => null, // frontend_class
'note' => null, // note
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, // is_global
'input_renderer' => null, // frontend_input_renderer
'visible' => 1, // is_visible
'searchable' => 0, // is_searchable
'filterable' => 0, // is_filterable
'comparable' => 0, // is_comparable
'visible_on_front' => 0, // is_visible_on_front
'wysiwyg_enabled' => 0, // is_wysiwyg_enabled
'is_html_allowed_on_front' => 0, // is_html_allowed_on_front
'visible_in_advanced_search' => 0, // is_visible_in_advanced_search
'filterable_in_search' => 0, // is_filterable_in_search
'used_in_product_listing' => 0, // used_in_product_listing
'used_for_sort_by' => 0, // used_for_sort_by
'apply_to' => '${all_simple_configurable_virtual_grouped_bundle}', // use comma to separate multiple values
'position' => 0, // position
'is_configurable' => 1, // is_configurable
'used_for_promo_rules' => 0, // is_used_for_promo_rules
'group' => null, // Attribute group
));
}
</template></templates>