Skip to content
Browse files

Add a Drupal interface

  • Loading branch information...
1 parent e515f98 commit db6faad16cfeeb7db4717fc20bb78d6dfff56952 @elkuku committed May 10, 2012
Showing with 117 additions and 0 deletions.
  1. +71 −0 code/application/interface/drupal.php
  2. +28 −0 config/application/drupal.dist.php
  3. +18 −0 config/repositories/drupal.xml
View
71 code/application/interface/drupal.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * User: elkuku
+ * Date: 10.05.12
+ * Time: 12:40
+ */
+class AcliApplicationInterfaceDrupal extends AcliApplicationInterface
+{
+ protected $name = 'joomla-cms';
+
+ public function createAdminUser(AcliModelDatabase $db)
+ {
+ // TODO: Implement createAdminUser() method.
+ }
+
+ public function createConfig()
+ {
+ // TODO: Implement createConfig() method.
+ }
+
+ public function cleanup()
+ {
+ // TODO: Implement cleanup() method.
+ }
+
+ public function setupDatabase()
+ {
+ // TODO: Implement setupDatabase() method.
+
+ $this->config->set('db_name', $this->config->get('target'));
+
+ $dbModel = new AcliModelDatabase($this->config);
+
+ $this->out(sprintf('Creating database %s ...', $this->config->get('db_name')), false);
+ $dbModel->createDB();
+ $this->out('ok');
+
+ return $this;
+ }
+
+ /**
+ * Displays a result message.
+ *
+ * @return array
+ */
+ public function getResultMessage()
+ {
+ // TODO: Implement getResultMessage() method.
+
+ $message = array();
+
+ $message[] = '';
+ $message[] = 'Drupal has been installed succesfully.';
+ $message[] = '';
+ $message[] = 'Credentials:';
+ $message[] = 'Database : ' . $this->config->get('db_name');
+ $message[] = 'Admin user : ' . $this->config->get('admin_user');
+ $message[] = 'Admin password : ' . $this->config->get('admin_password');
+ $message[] = '';
+
+ return $message;
+
+ }
+
+ public function getBrowserLinks()
+ {
+ // TODO: Implement getBrowserLinks() method.
+
+ return array('Drupal site' => '');
+ }
+}
View
28 config/application/drupal.dist.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * User: elkuku
+ * Date: 05.05.12
+ * Time: 17:55
+ */
+
+class AcliConfigDrupal extends JConfig
+{
+ // Database credentials
+ public $db_type = 'mysqli';
+ public $db_host = 'localhost';
+ public $db_user = 'root';
+ public $db_pass = '';
+ public $db_prefix = 'drupal_';
+
+ // Admin user credentials
+ public $admin_user = 'admin';
+ public $admin_password = 'test';
+ public $admin_email = 'demo@example.com';
+
+ // http://localhost
+ public $httpBase = 'http://joomla.tests';
+
+ public $patchDir = '';
+
+ public $patches = array();
+}
View
18 config/repositories/drupal.xml
@@ -0,0 +1,18 @@
+<repository>
+ <name>Drupal</name>
+ <versions>
+ <version>
+ <version>7.14</version>
+ <type>download</type>
+ <subfolder>drupal-7.14</subfolder>
+ <url>http://ftp.drupal.org/files/projects/drupal-7.14.zip</url>
+ <changelog></changelog>
+ </version>
+ <version>
+ <version>development</version>
+ <type>git</type>
+ <url>http://git.drupal.org/project/drupal.git</url>
+ <changelog></changelog>
+ </version>
+ </versions>
+</repository>

0 comments on commit db6faad

Please sign in to comment.
Something went wrong with that request. Please try again.