Skip to content

Commit e249b1f

Browse files
author
Gareth Midwood
committed
Initial import
1 parent d580afa commit e249b1f

File tree

5 files changed

+104
-0
lines changed

5 files changed

+104
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# cdev-framework-drupal7
2+
Drupal7 plugin for cdev

cdev.module.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
frameworks:
2+
- \Cdev\Magento1\Framework\Magento1

cdev.services.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" ?>
2+
3+
<container xmlns="http://symfony.com/schema/dic/services"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
6+
<services>
7+
8+
<service id="environment.framework.magento1"
9+
class="Cdev\Magento1\Framework\Magento1">
10+
</service>
11+
12+
</services>
13+
</container>

composer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "cdev/framework-magento1",
3+
"description": "Magento1 Framework plugin for cdev",
4+
"type": "cdev-plugin",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Gareth Midwood",
9+
"email": "gareth.midwood@creode.co.uk"
10+
}
11+
],
12+
"require": {},
13+
"autoload": {
14+
"psr-4": {
15+
"Cdev\\Magento1\\": "src"
16+
}
17+
}
18+
}

src/Framework/Magento1.php

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?php
2+
3+
namespace Cdev\Magento1\Framework;
4+
5+
use Creode\Framework\Framework;
6+
7+
class Magento1 extends Framework
8+
{
9+
const NAME = 'magento1';
10+
const LABEL = 'Magento 1';
11+
12+
const MAGERUN = 'bin/n98-magerun.phar';
13+
14+
/**
15+
* Returns commands to clear cache on this framework
16+
* @return array
17+
*/
18+
public function clearCache()
19+
{
20+
return [
21+
['php', self::MAGERUN, 'cache:clean'],
22+
['php', self::MAGERUN, 'cache:flush']
23+
];
24+
}
25+
26+
/**
27+
* Returns commands to run updates on this framework
28+
* @return array
29+
*/
30+
public function update()
31+
{
32+
return [
33+
['php', self::MAGERUN, 'sys:setup:run']
34+
];
35+
}
36+
37+
/**
38+
* Returns an array of tables that can have their data cleansed on dev environments
39+
* @return array
40+
*/
41+
public function getDBTableCleanseList()
42+
{
43+
return [
44+
'adminnotification_inbox',
45+
'aw_core_logger',
46+
'dataflow_batch_export',
47+
'dataflow_batch_import',
48+
'log_customer',
49+
'log_quote',
50+
'log_summary',
51+
'log_summary_type',
52+
'log_url',
53+
'log_url_info',
54+
'log_visitor',
55+
'log_visitor_info',
56+
'log_visitor_online',
57+
'index_event',
58+
'report_event',
59+
'report_viewed_product_index',
60+
'report_compared_product_index',
61+
'catalog_compare_item',
62+
'catalogindex_aggregation',
63+
'catalogindex_aggregation_tag',
64+
'catalogindex_aggregation_to_tag',
65+
'core_session',
66+
'catalogsearch_result'
67+
];
68+
}
69+
}

0 commit comments

Comments
 (0)