Skip to content

Commit

Permalink
Merge remote-tracking branch 'studio/master' into 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Pipa committed Dec 15, 2015
2 parents 1e381fb + ebd9716 commit 7d64e82
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 77 deletions.
60 changes: 1 addition & 59 deletions GETTING_STARTED.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Hacking on eZ Platform
# Getting started on eZ Platform

eZ Platform is built on top of **Symfony2 full stack framework** (version **2.x**), and as such all guidelines,
requirements and best practices remain the same.
Expand All @@ -9,26 +9,6 @@ in order to get the basics.
Note: Section below is out-of-date but represent some hints on how to be learn more about contributing to eZ Platform.
For introduction to *using* eZ Platform, please check our [online doc](doc.ez.no).

## Demo bundle
> "Bundle" is the name used for an extension in Symfony.
A demo bundle, [EzDemoBundle](https://github.com/ezsystems/ezpublish-community/tree/master/src/EzSystems/DemoBundle), is provided
in the *src/* directory under the *EzSystems* namespace and, among others, provides implementation for the demo design.
This demo bundle already exposes [some routes](https://github.com/ezsystems/ezpublish-community/blob/master/src/EzSystems/DemoBundle/Resources/config/routing.yml)
allowing to make some tests and hacking.

The most interesting routes for a start are :

- **eZTest**: Loads a content via the Public API and displays it. This content is expected to be a very simple folder with
*name* and *description* Field Definitions (formerly *content class attributes*).
- **eZTestWithLegacy**: Includes a legacy template in a new one.

> Warning: Public API still supports a limited number of Field Types (formerly *datatypes*), and as such you will probably get exceptions
> regarding that.
>
> To be able to show some content, please create a simple Content Type (formerly *content class*) via the admin interface
> (you can access it from your eZ Platform installation like you already did before).
## Guidelines and features available
### Generating a bundle
eZ Platform comes with [SensioGeneratorBundle](http://symfony.com/doc/current/bundles/SensioGeneratorBundle/index.html).
Expand Down Expand Up @@ -104,41 +84,3 @@ From a Twig template, it is possible to render a content with a sub-request:
```jinja
{% render "ez_content:viewLocation" with {"locationId": 123, "viewMode": "full"} %}
```

### Legacy templates inclusion
It is possible to include old templates (**.tpl*) into new ones:

```jinja
{# Twig template #}
{# Following code will include my/old_template.tpl, exposing $someVar variable in it #}
{% include "design:my/old_template.tpl" with {"someVar": "someValue"} %}
```

> **Note**
>
> Content/Location objects from the Public API are converted into eZContentObject/eZContentObjectTreeNode objects (re-fetched)
### Run legacy PHP code
The new kernel still relies on eZ Publish legacy kernel and runs it when needed inside an isolated PHP closure, making it sandboxed.

It is however still possible to run some PHP code inside that sandbox through the `runCallback()` method.

```php
<?php
// Declare use statements for the classes you may need
use eZINI;

// Inside a controller/action
$settingName = 'MySetting';
$test = array( 'oneValue', 'anotherValue' );
$myLegacySetting = $this->getLegacyKernel()->runCallback(
function () use ( $settingName, $test )
{
// Here you can reuse $settingName and $test variables inside the legacy context
$ini = eZINI::instance( 'someconfig.ini' );
return $ini->variable( 'SomeSection', $settingName );
}
);
```
> `runCallback()` can also take a 2nd argument. Setting to `true` avoids to re-initialize the legacy kernel environment after your call.
10 changes: 5 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Prerequisite

These instructions assume you have technical knowledge and have already installed PHP, web server &
*a database server* needed for this software. For further information on requirements [see online doc](https://doc.ez.no/display/EZP/Requirements)
*a database server* needed for this software. For further information on requirements [see online doc](https://doc.ez.no/display/TECHDOC/Requirements)

**Before you start**:
- Create Database: Installation will ask you for credentials/details for which database to use
Expand All @@ -26,7 +26,7 @@
`parameters.yml` contains settings for your database, mail system, and optionally [Solr](http://lucene.apache.org/solr/)
if `search_engine` is configured as `solr`, as opposed to default `legacy` *(a limited database powered search engine)*.

A. **Extract archive** (tar/zip) *from http://share.ez.no/downloads/downloads*
A. **Extract archive** (tar/zip) *from https://support.ez.no/Downloads/eZ-Studio-15.12*

Extract the eZ Studio archive to a directory, then execute post install scripts:

Expand All @@ -53,8 +53,8 @@

Options:
- `<version>`: Optional, *if omitted you'll get latest stable*, examples for specifying:
- `1.0.0@beta`: Example of getting latests 1.0.0 beta
- `v1.0.0-beta5`: example of picking a specific release/tag
- `~1.0.0`: Example of getting latests 1.0.x release, recommended
- `v1.0.0-beta5`: example of picking a specific tag
- `dev-master`: to get current development version (pre release) `master` branch
- For core development: Add '--prefer-source' to get full git clones, and remove '--no-dev' to get things like phpunit and behat installed.
- Further reading: https://getcomposer.org/doc/03-cli.md#create-project
Expand Down Expand Up @@ -135,7 +135,7 @@
You may now complete the eZ Studio installation with ezplatform:install command, example of use:

```bash
$ php -d memory_limit=-1 app/console ezplatform:install --env prod clean
$ php -d memory_limit=-1 app/console ezplatform:install --env prod demo
```

**Note**: Password for the generated `admin` user is `publish`, this name and password is needed when you would like to login to backend Studio UI. Future versions will prompt you for a unique password during installation.
Expand Down
11 changes: 0 additions & 11 deletions MODULE_CREATION.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ http://ez.no/Blog/What-to-Expect-from-eZ-Studio-and-eZ-Platform
For installation & upgrade instructions, see [INSTALL.md](https://github.com/ezsystems/ezstudio/blob/master/INSTALL.md).

## Requirements
**eZ Studio** currently has the same requirements as *eZ Platform*, further details on the [5.4 requirements](https://doc.ez.no/display/EZP/Requirements+5.4) page.
Full requirements can be found on the [Requirements](https://doc.ez.no/display/TECHDOC/Requirements) page.

*TL;DR: minimum PHP 5.4.4 and higher, using mod_php or php-fpm.*

Expand Down
2 changes: 1 addition & 1 deletion doc/nginx/etc/nginx/sites-available/mysite.com
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ server {
include ez_params.d/ez_rewrite_params;

# upload max size
client_max_body_size 2m;
client_max_body_size 20m;

location / {
location ~ ^/app\.php(/|$) {
Expand Down

0 comments on commit 7d64e82

Please sign in to comment.