Skip to content

Commit

Permalink
Merge pull request #3 from jorisros/master
Browse files Browse the repository at this point in the history
Convert plugin to Pimcore 5
  • Loading branch information
Sunohara666 authored Feb 2, 2018
2 parents b417b17 + 3845743 commit afceedb
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 46 deletions.
29 changes: 29 additions & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace ObjectBridgeBundle\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/configuration.html}
*/
class Configuration implements ConfigurationInterface
{
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('object_bridge');

// 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;
}
}
28 changes: 28 additions & 0 deletions DependencyInjection/ObjectBridgeExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace ObjectBridgeBundle\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.
*
* @link http://symfony.com/doc/current/cookbook/bundles/extension.html
*/
class ObjectBridgeExtension 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');
}
}
23 changes: 23 additions & 0 deletions ObjectBridgeBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace ObjectBridgeBundle;

use Pimcore\Extension\Bundle\AbstractPimcoreBundle;

class ObjectBridgeBundle extends AbstractPimcoreBundle
{
public function getJsPaths()
{
return [
'/bundles/objectbridge/js/pimcore/objects/tags/objectBridge.js',
'/bundles/objectbridge/js/pimcore/objects/classes/data/objectBridge.js'
];
}

public function getCssPaths()
{
return [
'/bundles/objectbridge/css/object-bridge.css'
];
}
}
Empty file.
24 changes: 24 additions & 0 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
# default configuration for services in *this* file
_defaults:
# automatically injects dependencies in your services
autowire: true
# automatically registers your services as commands, event subscribers, etc.
autoconfigure: true
# this means you cannot fetch services directly from the container via $container->get()
# if you need to do this, you can override this setting on individual services
public: false

# controllers are imported separately to make sure they're public
# and have a tag that allows actions to type-hint services
# ObjectBridgeBundle\Controller\:
# resource: '../../Controller'
# public: true
# tags: ['controller.service_arguments']

# add more services, or override services that need manual wiring
# ObjectBridgeBundle\ExampleClass:
# arguments:
# - "@service_id"
# - "plain_value"
# - "%parameter%"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ pimcore.object.tags.objectBridge = Class.create(pimcore.object.tags.objects, {
pageSize: 10,
proxy: {
type: 'ajax',
//@TODO Change after plugin has been converter
url: '/plugin/PimcoreHrefTypeahead/search/find',
reader: {
type: 'json',
Expand Down
22 changes: 18 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
{
"name": "youwe/pimcore-object-bridge",
"description": "Allows editing an object inline that doesn't link directly many-to-many like",
"type": "pimcore-plugin",
"type": "pimcore-bundle",
"require": {
"pimcore/installer-plugin": "^1.5",
"youwe/pimcore-href-typeahead": "0.*"
"pimcore/core-version": "~5.1.0"
},
"license": "MIT",
"authors": [
{
"name": "Manea Eugen",
"email": "[email protected]"
},{
"name": "Joris Ros",
"email": "[email protected]"
},
{
"name": "Youwe"
}
]
],
"autoload": {
"psr-4": {
"ObjectBridgeBundle\\": "/"
}
},
"extra": {
"pimcore": {
"bundles": [
"ObjectBridgeBundle\\ObjectBridgeBundle"
]
}
}
}
42 changes: 0 additions & 42 deletions plugin.xml

This file was deleted.

0 comments on commit afceedb

Please sign in to comment.