Permalink
Browse files

Starts of the Logging Admin Interface Bundle

  • Loading branch information...
0 parents commit 070181a3e7314c0b65b51d27d2a7e38127244be7 @michaelcullum michaelcullum committed Aug 16, 2012
@@ -0,0 +1,21 @@
+<?php
+/**
+ *
+ * @package phpBBLoggingAdminInterfaceBundle
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-3.0.php GNU General Public License v3
+ * @author Unknown Bliss
+ *
+ */
+
+namespace phpBB\LoggingAdminInterfaceBundle\Controller;
+
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+
+class DefaultController extends Controller
+{
+ public function indexAction($name)
+ {
+ return $this->render('phpBBLoggingAdminInterfaceBundle:Default:index.html.twig', array('name' => $name));
+ }
+}
@@ -0,0 +1,37 @@
+<?php
+/**
+ *
+ * @package phpBBLoggingAdminInterfaceBundle
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-3.0.php GNU General Public License v3
+ * @author Unknown Bliss
+ *
+ */
+
+namespace phpBB\LoggingAdminInterfaceBundle\DependencyInjection;
+
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+use Symfony\Component\Config\Definition\ConfigurationInterface;
+
+/**
+ * This is the class that validates and merges configuration from your app/config files
+ *
+ * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
+ */
+class Configuration implements ConfigurationInterface
+{
+ /**
+ * {@inheritDoc}
+ */
+ public function getConfigTreeBuilder()
+ {
+ $treeBuilder = new TreeBuilder();
+ $rootNode = $treeBuilder->root('php_bb_logging_admin_interface');
+
+ // Here you should define the parameters that are allowed to
+ // configure your bundle. See the documentation linked above for
+ // more information on that topic.
+
+ return $treeBuilder;
+ }
+}
@@ -0,0 +1,36 @@
+<?php
+/**
+ *
+ * @package phpBBLoggingAdminInterfaceBundle
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-3.0.php GNU General Public License v3
+ * @author Unknown Bliss
+ *
+ */
+
+namespace phpBB\LoggingAdminInterfaceBundle\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\Config\FileLocator;
+use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\DependencyInjection\Loader;
+
+/**
+ * This is the class that loads and manages your bundle configuration
+ *
+ * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
+ */
+class phpBBLoggingAdminInterfaceExtension extends Extension
+{
+ /**
+ * {@inheritDoc}
+ */
+ public function load(array $configs, ContainerBuilder $container)
+ {
+ $configuration = new Configuration();
+ $config = $this->processConfiguration($configuration, $configs);
+
+ $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
+ $loader->load('services.yml');
+ }
+}
186 LICENSE

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,6 @@
+# Logging Admin Interface
+
+This uses advanced monolog logging to add a UI using phpBB's Admin Panel Bundle.
+It also adds logging functionality to the Admin Panel.
+
+It was originally developed for use on the new phpBB Symfony Website but was then open sourced.
@@ -0,0 +1,3 @@
+phpBBLoggingAdminInterfaceBundle_homepage:
+ pattern: /hello/{name}
+ defaults: { _controller: phpBBLoggingAdminInterfaceBundle:Default:index }
@@ -0,0 +1,7 @@
+parameters:
+# php_bb_logging_admin_interface.example.class: phpBB\LoggingAdminInterfaceBundle\Example
+
+services:
+# php_bb_logging_admin_interface.example:
+# class: %php_bb_logging_admin_interface.example.class%
+# arguments: [@service_id, "plain_value", %parameter%]

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1 @@
+Hello {{ name }}!
@@ -0,0 +1,25 @@
+<?php
+/**
+ *
+ * @package phpBBLoggingAdminInterfaceBundle
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-3.0.php GNU General Public License v3
+ * @author Unknown Bliss
+ *
+ */
+
+namespace phpBB\LoggingAdminInterfaceBundle\Tests\Controller;
+
+use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
+
+class DefaultControllerTest extends WebTestCase
+{
+ public function testIndex()
+ {
+ $client = static::createClient();
+
+ $crawler = $client->request('GET', '/hello/Fabien');
+
+ $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
+ }
+}
@@ -0,0 +1,28 @@
+{
+ "name": "phpbb/logging-admin-interface-bundle",
+ "description": "A symfony bundle that provides an admin GUI for logs.",
+ "keywords": ["phpBB", "logs", "tools", "logging"],
+ "type": "symfony-bundle",
+ "homepage": "http://www.phpbb.com",
+ "license": "GPL-3.0",
+ "authors": [
+ {
+ "name": "phpBB Group",
+ "email": "operations@phpbb.com",
+ "homepage": "https://phpbb.com/"
+ }
+ ],
+ "require": {
+ "symfony/symfony": "2.1.*"
+ },
+ "minimum-stability": "dev",
+ "autoload": {
+ "psr-0": { "phpBB\\LoggingAdminInterfaceBundle": "" }
+ },
+ "target-dir": "phpBB/LoggingAdminInterfaceBundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.0-dev"
+ }
+ }
+}
@@ -0,0 +1,17 @@
+<?php
+/**
+ *
+ * @package phpBBLoggingAdminInterfaceBundle
+ * @copyright (c) 2012 phpBB Group
+ * @license http://opensource.org/licenses/gpl-3.0.php GNU General Public License v3
+ * @author Unknown Bliss
+ *
+ */
+
+namespace phpBB\LoggingAdminInterfaceBundle;
+
+use Symfony\Component\HttpKernel\Bundle\Bundle;
+
+class phpBBLoggingAdminInterfaceBundle extends Bundle
+{
+}

0 comments on commit 070181a

Please sign in to comment.