Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Jun 23, 2019
0 parents commit caa5c83
Show file tree
Hide file tree
Showing 30 changed files with 1,239 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
######################
# Compiled source #
######################
*.com
*.class
*.dll
*.exe
*.o
*.so

######################
# Packages #
######################
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar

######################
# Logs and databases #
######################
*.log

######################
# Global #
######################
.DS_Store
.DS_Store\?
._*
.Spotlight-V100
.Trashes
Icon\?
*.sublime-workspace
*.sublime-project
atlassian-ide-plugin.xml
.idea/
.project
ehthumbs.db
Thumbs.db
Vagrantfile
.vagrant
php-cgi.core
.sass-cache

# codeception (only stage *.dist.yml config files)
/codeception.yml
/tests/codeception.yml
/tests/*.suite.yml
/tests/_output/*
/tests/_data/*
!/tests/_data/.gitkeep
/tests/_support/_generated/*
40 changes: 40 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributor Covenant Code of Conduct

## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards
Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
12 changes: 12 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
| Q | A
| ---------------- | -----
| Bug report? | yes/no
| Feature request? | yes/no
| BC Break report? | yes/no
| RFC? | yes/no

<!--
- Please fill in this template according to your issue.
- For support request or how-tos, visit https://gitter.im/pimcore/pimcore or https://talk.pimcore.org/
- Otherwise, replace this comment by the description of your issue.
-->
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# License
Copyright (C) 2017 DACHCOM.DIGITAL

This software is available under the GNU General Public License version 3 (GPLv3).

### GNU General Public License version 3 (GPLv3)
If you decide to choose the GPLv3 license, you must comply with the following terms:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

[GNU General Public License](lhttps://www.gnu.org/licenses/gpl-3.0.en.html)
12 changes: 12 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
| Q | A
| ------------- | ---
| Bug fix? | yes/no
| New feature? | yes/no
| BC breaks? | no
| Deprecations? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
-->
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dynamic Search | Data Provider: Trinity Data

Crawl Pimcore Data: `assets`, `documents` and `objects`.
31 changes: 31 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "dachcom-digital/dynamic-search-data-provider-trinity",
"type": "pimcore-bundle",
"license": "GPL-3.0+",
"description": "",
"keywords": ["pimcore", "search", "dynamic-search", "data-provider","trinity", "assets", "documents", "objects"],
"homepage": "https://github.com/dachcom-digital/pimcore-dynamic-search-data-provider-trinity",
"authors": [
{
"name": "DACHCOM.DIGITAL Stefan Hagspiel",
"email": "[email protected]",
"homepage": "http://www.dachcom.com/",
"role": "Developer"
}
],
"autoload": {
"psr-4": {
"DsTrinityDataBundle\\": "src/DsTrinityDataBundle"
}
},

"extra": {
"pimcore": {
"bundles": [
"DsTrinityDataBundle\\DsTrinityDataBundle"
]
}
},
"require": {
}
}
29 changes: 29 additions & 0 deletions src/DsTrinityDataBundle/Configuration/Configuration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace DsTrinityDataBundle\Configuration;

class Configuration implements ConfigurationInterface
{
/**
* @var array
*/
protected $config;

/**
* @param array $config
*/
public function setConfig($config = [])
{
$this->config = $config;
}

/**
* @param string $slot
*
* @return mixed
*/
public function get($slot)
{
return $this->config[$slot];
}
}
13 changes: 13 additions & 0 deletions src/DsTrinityDataBundle/Configuration/ConfigurationInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace DsTrinityDataBundle\Configuration;

interface ConfigurationInterface
{
/**
* @param string $slot
*
* @return mixed
*/
public function get($slot);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace DsTrinityDataBundle\DependencyInjection\Compiler;

use DsTrinityDataBundle\Registry\DataBuilderRegistry;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

final class DataBuilderPass implements CompilerPassInterface
{
/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container)
{
foreach ($container->findTaggedServiceIds('ds_trinity_data.data_builder', true) as $id => $tags) {
$definition = $container->getDefinition(DataBuilderRegistry::class);
foreach ($tags as $attributes) {
$definition->addMethodCall('register', [new Reference($id), $attributes['identifier'], $attributes['type']]);
}
}
}
}
17 changes: 17 additions & 0 deletions src/DsTrinityDataBundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace DsTrinityDataBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('ds_trinity_data');

return $treeBuilder;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace DsTrinityDataBundle\DependencyInjection;

use DsTrinityDataBundle\Configuration\Configuration as BundleConfiguration;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;

class DsTrinityDataExtension extends Extension
{
/**
* @param array $configs
* @param ContainerBuilder $container
*
* @throws \Exception
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);

$loader = new YamlFileLoader($container, new FileLocator([__DIR__ . '/../Resources/config']));
$loader->load('services.yml');

$configManagerDefinition = $container->getDefinition(BundleConfiguration::class);
$configManagerDefinition->addMethodCall('setConfig', [$config]);
}
}
35 changes: 35 additions & 0 deletions src/DsTrinityDataBundle/DsTrinityDataBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace DsTrinityDataBundle;

use DsTrinityDataBundle\DependencyInjection\Compiler\DataBuilderPass;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class DsTrinityDataBundle extends AbstractPimcoreBundle
{
// use PackageVersionTrait;

const PACKAGE_NAME = 'dachcom-digital/dynamic-search-data-provider-trinity-data';

const PROVIDER_NAME = 'trinityData';

/**
* @param ContainerBuilder $container
*/
public function build(ContainerBuilder $container)
{
parent::build($container);

$container->addCompilerPass(new DataBuilderPass());
}

/**
* {@inheritdoc}
*/
protected function getComposerPackageName(): string
{
return self::PACKAGE_NAME;
}
}
8 changes: 8 additions & 0 deletions src/DsTrinityDataBundle/DsTrinityDataEvents.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace DsTrinityDataBundle;

final class DsTrinityDataEvents
{

}
Loading

0 comments on commit caa5c83

Please sign in to comment.