Skip to content

Commit

Permalink
Move HelloWorld plugin from Hurad
Browse files Browse the repository at this point in the history
  • Loading branch information
atkrad committed Dec 31, 2013
1 parent b1c6791 commit f629b83
Show file tree
Hide file tree
Showing 19 changed files with 151 additions and 8 deletions.
28 changes: 22 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
tmp/*
[Cc]onfig/core.php
[Cc]onfig/database.php
app/tmp/*
app/[Cc]onfig/core.php
app/[Cc]onfig/database.php
# IDE config files
/nbproject/
/.idea

# Editor software auto created
*~
*.bak
*.swp

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Composer files
composer.phar
composer.lock

!empty
9 changes: 9 additions & 0 deletions Config/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

HuradNavigation::addSubMenu(
'dashboard',
'hello_world',
__d('hurad', 'Hello World'),
['admin' => true, 'plugin' => 'hello_world', 'controller' => 'hello'],
'manage_options'
);
11 changes: 11 additions & 0 deletions Config/info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>

<plugin>
<name>Hello World</name>
<plugin_uri>https://github.com/hurad/hello-world</plugin_uri>
<description>Example plugin for demonstrating plugin API.</description>
<version>0.1.0</version>
<author>Hurad Community</author>
<author_uri>https://github.com/hurad/hello-world/graphs/contributors</author_uri>
<license>MIT</license>
</plugin>
Empty file added Controller/Component/empty
Empty file.
21 changes: 21 additions & 0 deletions Controller/HelloController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

class HelloController extends HelloWorldAppController
{

var $name = 'Hello';

public function beforeFilter()
{
parent::beforeFilter();
$this->Auth->allow();
}

public function admin_index()
{
$this->set('title_for_layout', __('Hello World'));
}

}

?>
9 changes: 9 additions & 0 deletions Controller/HelloWorldAppController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

App::uses('AppController', 'Controller');

class HelloWorldAppController extends AppController
{

}

Empty file added Lib/empty
Empty file.
Empty file added Model/Behavior/empty
Empty file.
Empty file added Model/Datasource/empty
Empty file.
13 changes: 13 additions & 0 deletions Model/HelloModel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

/**
* Description of HelloModel
*
* @author mohammad
*/
class HelloModel extends HelloWorldAppModel
{

public $name = 'Hello';

}
9 changes: 9 additions & 0 deletions Model/HelloWorldAppModel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

App::uses('AppModel', 'Model');

class HelloWorldAppModel extends AppModel
{

}

31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
hello-world
===========
# Hello World

Example plugin for demonstrating plugin API

## Requirements

The master branch has the following requirements:

* Hurad 0.1.0 or greater.
* PHP 5.4 or greater.

## Installation

* Clone/Copy the files in this directory into `app/Plugin/HelloWorld`
* Activate the plugin from your admin panel.

### Using Composer

Ensure `require` is present in `composer.json`. This will install the plugin into `Plugin/HelloWorld`:

```
{
"require": {
"hurad/hello-world": "0.1.*"
}
}
```

## Issues with Hello World

If you have issues with Hello World, you can report them at https://github.com/hurad/hello-world/issues
Empty file.
Empty file added Test/Case/Model/Behavior/empty
Empty file.
Empty file added Test/Case/View/Helper/empty
Empty file.
Empty file added Test/Fixture/empty
Empty file.
3 changes: 3 additions & 0 deletions View/Hello/admin_index.ctp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h2>
<?php echo $title_for_layout; ?>
</h2>
25 changes: 25 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "hurad/hello-world",
"description": "Hurad Hello World Plugin",
"type": "hurad-plugin",
"keywords": ["Hurad", "Hello World", "plugin", "example", "demo"],
"homepage": "https://github.com/hurad/hello-world",
"license": "MIT",
"authors": [
{
"name": "Hurad Community",
"homepage": "https://github.com/hurad/hello-world/graphs/contributors"
}
],
"support": {
"issues": "https://github.com/hurad/hello-world/issues",
"source": "https://github.com/hurad/hello-world"
},
"require": {
"php": ">=5.4",
"composer/installers": "*"
},
"extra": {
"installer-name": "HelloWorld"
}
}
Empty file added webroot/empty
Empty file.

0 comments on commit f629b83

Please sign in to comment.