Skip to content

Commit

Permalink
adding blogmodule
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoonis committed Oct 19, 2014
1 parent 3e7e1d3 commit f268833
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 28 deletions.
1 change: 1 addition & 0 deletions app/config/base/app.php
Expand Up @@ -6,6 +6,7 @@
'Framework',
'Application',
'UserModule',
'BlogModule',
'PPI\ComposerModule'
),
'module_listener_options' => array(
Expand Down
1 change: 0 additions & 1 deletion utils/skeleton_module/Controller/Shared.php
Expand Up @@ -6,5 +6,4 @@
class Shared extends BaseController
{


}
42 changes: 20 additions & 22 deletions utils/skeleton_module/Module.php
@@ -1,43 +1,41 @@
<?php

namespace [MODULE_NAME];

use PPI\Module\Module as BaseModule;
use PPI\Autoload;
use PPI\Module\AbstractModule;

class Module extends BaseModule
class Module extends AbstractModule
{
protected $_moduleName = '[MODULE_NAME]';

public function init($e)
/**
* Get the routes for this module
*
* @return \Symfony\Component\Routing\RouteCollection
*/
public function getRoutes()
{
Autoload::add(__NAMESPACE__, dirname(__DIR__));
return $this->loadYamlRoutes(__DIR__ . '/resources/config/routes.yml');
}

/**
* Get the configuration for this module
*
* @return array
*/
public function getConfig()
{
return include(__DIR__ . '/resources/config/config.php');
return $this->loadConfig(__DIR__ . '/resources/config/config.php');
}

/**
* Get the routes for this module
*
* @return \Symfony\Component\Routing\RouteCollection
*/
public function getRoutes()
public function getAutoloaderConfig()
{
return $this->loadYamlRoutes(__DIR__ . '/resources/config/routes.yml');
return array(
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
__NAMESPACE__ => __DIR__ . '/src/',
),
),
);
}

// public function getServiceConfig()
// {
// return array('factories' => array(
//
// ));
// }

}
4 changes: 2 additions & 2 deletions utils/skeleton_module/resources/config/routes.yml
@@ -1,3 +1,3 @@
[MODULE_NAME]_home:
pattern: /[MODULE_NAME]/home
[MODULE_NAME]_Index:
pattern: /[MODULE_NAME]/index
defaults: { _controller: "[MODULE_NAME]:Index:index"}
7 changes: 4 additions & 3 deletions utils/skeleton_module/resources/views/index/index.html.php
Expand Up @@ -5,9 +5,10 @@
<div class="box-content">
<p>Don't forget to check out some relevant documentation you can do with your module</p>
<ul class="unstyled">
<li><a href="http://www.ppi.io/docs/modules.html" title="" target="_blank">Modules</a></li>
<li><a href="http://www.ppi.io/docs/controllers.html" title="" target="_blank">Controllers</a></li>
<li><a href="http://www.ppi.io/docs/templating.html" title="" target="_blank">Templating</a></li>
<li><a href="http://www.ppi.io/docs/2.1/modules.html" title="" target="_blank">Modules</a></li>
<li><a href="http://www.ppi.io/docs/2.1/controllers.html" title="" target="_blank">Controllers</a></li>
<li><a href="http://www.ppi.io/docs/2.1/routing.html" title="" target="_blank">Routing</a></li>
<li><a href="http://www.ppi.io/docs/2.1/templating.html" title="" target="_blank">Templating</a></li>
</ul>
</div>
</div>

0 comments on commit f268833

Please sign in to comment.