Skip to content

Commit 3c6325b

Browse files
committed
Initial commit
0 parents  commit 3c6325b

29 files changed

+683
-0
lines changed

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.idea
2+
.DS_STORE
3+
atlassian-ide-plugin.xml
4+
GETTING_STARTED.md
5+
LICENSE
6+
MODULE_CREATION.md
7+
vendor
8+
plugins
9+
ezpublish_legacy
10+
ezpublish/cache
11+
ezpublish/logs
12+
web/bundles
13+
web/design
14+
web/extension
15+
web/share
16+
web/var
17+
ezpublish/config/config_priv.yml

INSTALL.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Installation guide
2+
3+
1. Create a new git repository: "my-project-name"
4+
5+
2. Checkout keyteq-ez5-skeleton
6+
<pre><code>git clone [email protected]:Keyteq/keyteq-ez5-skeleton.git my-project-name
7+
cd ./my-project-name
8+
git remote set-url origin [email protected]:Keyteq/my-project-name.git
9+
git push origin master
10+
</code></pre>
11+
3. Run composer
12+
<pre><code>php composer.phar install
13+
php composer.phar update
14+
</code></pre>
15+
4. If no virtualhost or other webarea created, do so now. Point to content of web folder.
16+
17+
5. Setup appropriate redirect rules for eZ Publish 5. Either vhost-conf or htaccess
18+
19+
6. If initial install of project, continue reading, else you can go ahead and code.
20+
21+
22+
Known issue:
23+
image magick path can differ between the different environments. Check ezpublish.yml

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Keyteq eZ Publish 5 skeleton
2+
3+
A simple setup for dependencyhandling and development collaboration for the eZ Publish 5 platform.

composer.json

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"name" : "keyteq/ez5",
3+
"description": "A starting point for creating eZ Publish 5 projects.",
4+
"version": "0.1.0",
5+
"type": "project",
6+
"minimum-stability": "dev",
7+
8+
"require" : {
9+
"php": ">=5.3.10",
10+
"keyteq/devtools": "dev-master"
11+
},
12+
"repositories" : [{
13+
"type" : "git",
14+
"url" : "[email protected]:Keyteq/keyteq-devtools.git"
15+
}
16+
],
17+
"config":{
18+
"vendor-dir": "plugins"
19+
},
20+
"scripts":{
21+
"post-install-cmd":[
22+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::check",
23+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::cache",
24+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::moveSiteaccesses",
25+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::assets",
26+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::legacy",
27+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::legacyExtensions",
28+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::legacyAutoload",
29+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::legacyPermissions",
30+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::cache"
31+
],
32+
"post-update-cmd":[
33+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::check",
34+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::cache",
35+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::moveSiteaccesses",
36+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::assets",
37+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::legacy",
38+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::legacyExtensions",
39+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::legacyAutoload",
40+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::legacyPermissions",
41+
"Keyteq\\Bundle\\DevtoolsBundle\\Composer\\Installer::cache"
42+
]
43+
},
44+
"extra": {
45+
46+
"required-folders": {
47+
"vendor": "eZ Publish is shipped with a folder with all framework dependencies.",
48+
"ezpublish_legacy": "eZ Publish is shipped with a folder used for all legacy code and dependencies."
49+
},
50+
"extensions" : {
51+
"ezexceed": {
52+
"src" : "[email protected]:KeyteqLabs/ezexceed.git",
53+
"branch": "1.2"
54+
}
55+
}
56+
}
57+
}
58+

ez-dependencies.php

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
echo "Checking folder for required dependencies.\n";
3+
4+
$vendor = getcwd() . "/vendor";
5+
$legacy = getcwd() . "/ezpublish_legacy";
6+
7+
if (is_dir($vendor) && is_dir($legacy))
8+
{
9+
echo "All dependencies in place. Nothing to do.";
10+
exit(0);
11+
}
12+
13+
$pathToEz = isset($argv[1]) ? $argv[1] : null;
14+
15+
if (!is_dir($pathToEz) && !is_link($pathToEz))
16+
{
17+
echo "Supply to ezpublish sources: ";
18+
$handle = fopen ("php://stdin","r");
19+
$pathToEz = trim(preg_replace("/[\r\n]/","",fgets($handle)));
20+
if(!is_dir($pathToEz) && !is_link($pathToEz)){
21+
echo "Path: $pathToEz does not exist.";
22+
exit(1);
23+
}
24+
}
25+
26+
$pathToEzVendor = $pathToEz . "/vendor";
27+
$pathToEzLegacy = $pathToEz . "/ezpublish_legacy";
28+
29+
if (file_exists($pathToEzVendor) && file_exists($pathToEzLegacy))
30+
{
31+
echo "Copy: $pathToEzVendor -> $vendor\n";
32+
//copy($pathToEzVendor, $vendor);
33+
exec("cp -r $pathToEzVendor $vendor");
34+
echo "Copy: $pathToEzLegacy -> $legacy\n";
35+
//copy($pathToEzLegacy, $legacy);
36+
exec("cp -r $pathToEzLegacy $legacy");
37+
exit(0);
38+
}
39+
else {
40+
echo "Could not find sources for vendor and ezpublish_legacy.";
41+
exit(1);
42+
}
43+
44+
echo "\n";
45+
echo "Thank you, continuing...\n";

ezpublish/EzPublishCache.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
/**
3+
* File containing the EzPublishCache class.
4+
*
5+
* @copyright Copyright (C) 1999-2013 eZ Systems AS. All rights reserved.
6+
* @license http://ez.no/eZPublish/Licenses/eZ-Trial-and-Test-License-Agreement-eZ-TTL-v2.0 eZ Trial and Test License Agreement Version 2.0
7+
* @version 5.1.0-beta1
8+
*/
9+
10+
use eZ\Bundle\EzPublishCoreBundle\HttpCache;
11+
12+
class EzPublishCache extends HttpCache
13+
{
14+
}

ezpublish/EzPublishKernel.php

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?php
2+
/**
3+
* File containing the EzPublishKernel class.
4+
*
5+
* @copyright Copyright (C) 1999-2013 eZ Systems AS. All rights reserved.
6+
* @license http://ez.no/eZPublish/Licenses/eZ-Trial-and-Test-License-Agreement-eZ-TTL-v2.0 eZ Trial and Test License Agreement Version 2.0
7+
* @version 5.1.0-beta1
8+
*/
9+
10+
use eZ\Bundle\EzPublishCoreBundle\EzPublishCoreBundle;
11+
use Egulias\ListenersDebugCommandBundle\EguliasListenersDebugCommandBundle;
12+
use eZ\Bundle\EzPublishLegacyBundle\EzPublishLegacyBundle;
13+
use eZ\Bundle\EzPublishRestBundle\EzPublishRestBundle;
14+
use EzSystems\DemoBundle\EzSystemsDemoBundle;
15+
use Symfony\Component\HttpKernel\Kernel;
16+
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
17+
use Symfony\Bundle\SecurityBundle\SecurityBundle;
18+
use Symfony\Bundle\TwigBundle\TwigBundle;
19+
use Symfony\Bundle\MonologBundle\MonologBundle;
20+
use Symfony\Bundle\AsseticBundle\AsseticBundle;
21+
use Symfony\Bundle\WebProfilerBundle\WebProfilerBundle;
22+
use Symfony\Component\Config\Loader\LoaderInterface;
23+
use Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle;
24+
use Tedivm\StashBundle\TedivmStashBundle;
25+
26+
class EzPublishKernel extends Kernel
27+
{
28+
/**
29+
* Returns an array of bundles to registers.
30+
*
31+
* @return array An array of bundle instances.
32+
*
33+
* @api
34+
*/
35+
public function registerBundles()
36+
{
37+
$bundles = array(
38+
new FrameworkBundle(),
39+
new SecurityBundle(),
40+
new TwigBundle(),
41+
new MonologBundle(),
42+
new AsseticBundle(),
43+
new SensioGeneratorBundle(),
44+
new TedivmStashBundle(),
45+
new EzPublishCoreBundle(),
46+
new EzPublishLegacyBundle(),
47+
new EzSystemsDemoBundle(),
48+
new EzPublishRestBundle(),
49+
);
50+
51+
if ( $this->getEnvironment() === 'dev' ||
52+
$this->getEnvironment() === 'priv'
53+
)
54+
{
55+
$bundles[] = new WebProfilerBundle();
56+
$bundles[] = new EguliasListenersDebugCommandBundle();
57+
}
58+
59+
return $bundles;
60+
}
61+
62+
/**
63+
* Loads the container configuration
64+
*
65+
* @param LoaderInterface $loader A LoaderInterface instance
66+
*
67+
* @api
68+
*/
69+
public function registerContainerConfiguration( LoaderInterface $loader )
70+
{
71+
$loader->load( __DIR__ . '/config/config_' . $this->getEnvironment() . '.yml' );
72+
try
73+
{
74+
$loader->load( __DIR__ . '/config/ezpublish_' . $this->getEnvironment() . '.yml' );
75+
}
76+
catch ( \InvalidArgumentException $e )
77+
{
78+
$loader->load( __DIR__ . '/config/ezpublish_setup.yml' );
79+
}
80+
}
81+
}

ezpublish/autoload.php

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* File containing the autoload configuration.
4+
* It uses Composer autoloader and is greatly inspired by the Symfony standard distribution's.
5+
*
6+
* @copyright Copyright (C) 1999-2013 eZ Systems AS. All rights reserved.
7+
* @license http://ez.no/eZPublish/Licenses/eZ-Trial-and-Test-License-Agreement-eZ-TTL-v2.0 eZ Trial and Test License Agreement Version 2.0
8+
* @version 5.1.0-beta1
9+
*/
10+
11+
use Doctrine\Common\Annotations\AnnotationRegistry;
12+
13+
$loader = require __DIR__.'/../vendor/autoload.php';
14+
15+
// intl
16+
if ( !function_exists( 'intl_get_error_code' ) )
17+
{
18+
require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
19+
$loader->add( '', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs' );
20+
}
21+
22+
AnnotationRegistry::registerLoader( array( $loader, 'loadClass' ) );
23+
24+
return $loader;

ezpublish/autoload_plugins.php

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/**
3+
* File containing the autoload configuration.
4+
* It uses Composer autoloader and is greatly inspired by the Symfony standard distribution's.
5+
*
6+
* @copyright Copyright (C) 1999-2013 eZ Systems AS. All rights reserved.
7+
* @license http://ez.no/eZPublish/Licenses/eZ-Trial-and-Test-License-Agreement-eZ-TTL-v2.0 eZ Trial and Test License Agreement Version 2.0
8+
* @version 5.1.0-beta1
9+
*/
10+
11+
use Doctrine\Common\Annotations\AnnotationRegistry;
12+
13+
/* @var $loader \Composer\Autoload\ClassLoader */
14+
$loader = require __DIR__.'/../plugins/autoload.php';
15+
16+
// intl
17+
if ( !function_exists( 'intl_get_error_code' ) )
18+
{
19+
require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
20+
$loader->add( '', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs' );
21+
}
22+
23+
AnnotationRegistry::registerLoader( array( $loader, 'loadClass' ) );
24+
25+
return $loader;

ezpublish/config/config.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
imports:
2+
- { resource: parameters.yml }
3+
- { resource: security.yml }
4+
5+
framework:
6+
esi: ~
7+
fragments: ~
8+
translator: { fallback: %locale_fallback% }
9+
# The secret parameter is used to generate CSRF tokens
10+
secret: %secret%
11+
router: { resource: "%kernel.root_dir%/config/routing.yml" }
12+
form: true
13+
csrf_protection: false
14+
validation: { enable_annotations: true }
15+
templating: { engines: ['twig', 'eztpl'] } #assets_version: SomeVersionScheme
16+
session: ~
17+
# The session name defined here will be overridden by the one defined in your ezpublish.yml, for your siteaccess.
18+
# Defaut session name is "eZSESSID{siteaccess_hash}" (unique session name per siteaccess).
19+
# See ezpublish.yml.example for an example on how to configure this.
20+
21+
# Requirements for less parser
22+
# Mac OS X:
23+
# Install Node.js
24+
# $ sudo port install node
25+
# Install npm
26+
# $ sudo port install npm
27+
# Install less via npm, but globally
28+
# $ sudo npm install -g less
29+
assetic:
30+
debug: %kernel.debug%
31+
use_controller: false
32+
filters:
33+
less:
34+
node: /opt/local/bin/node
35+
node_paths: [/opt/local/lib/node_modules]
36+
37+
ez_publish_legacy:
38+
enabled: true
39+
root_dir: %kernel.root_dir%/../ezpublish_legacy
40+
41+
parameters:

ezpublish/config/config_dev.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
imports:
2+
- { resource: config.yml }
3+
4+
framework:
5+
router: { resource: "%kernel.root_dir%/config/routing_dev.yml" }
6+
profiler: { only_exceptions: false }
7+
8+
web_profiler:
9+
toolbar: true
10+
position: bottom
11+
intercept_redirects: false
12+
13+
# Requirements for less parser
14+
# Mac OS X:
15+
# Install Node.js
16+
# $ sudo port install node
17+
# Install npm
18+
# $ sudo port install npm
19+
# Install less via npm, but globally
20+
# $ sudo npm install -g less
21+
assetic:
22+
use_controller: true
23+
24+
monolog:
25+
handlers:
26+
main:
27+
type: stream
28+
path: "%kernel.logs_dir%/%kernel.environment%.log"
29+
level: debug
30+
firephp:
31+
type: firephp
32+
level: info

0 commit comments

Comments
 (0)