Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/11.0' into 11.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	bundles/CoreBundle/config/pimcore/flysystem.yaml
  • Loading branch information
dvesh3 committed Jun 1, 2023
2 parents a09a492 + 9f2ed71 commit dd654dd
Show file tree
Hide file tree
Showing 51 changed files with 130 additions and 86 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ cd ./my-project

This will install an empty skeleton application,
but we're also offering a demo package for your convenience - of course also with 3 commands 💪
[Click here for more installation options and a detailed guide](https://pimcore.com/docs/pimcore/current/Getting_Started/Installation.html)
[Click here for more installation options and a detailed guide](https://pimcore.com/docs/platform/Pimcore/Getting_Started/)

## Copyright and License
Copyright: [Pimcore](https://www.pimcore.org) GmbH
Expand Down
10 changes: 0 additions & 10 deletions bundles/CoreBundle/config/pimcore/flysystem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ flysystem:
directory_visibility: public
options:
directory: '%kernel.project_dir%/public/var/assets'
permissions:
file:
private: 0o644
dir:
private: 0o755
pimcore.asset_cache.storage:
# Storage for cached asset files, e.g. PDF and image files generated out of Office files or videos
# which are then used by the thumbnail engine as source files
Expand All @@ -34,11 +29,6 @@ flysystem:
directory_visibility: public
options:
directory: '%kernel.project_dir%/public/var/tmp/thumbnails'
permissions:
file:
private: 0o644
dir:
private: 0o755
pimcore.version.storage:
# Storage for serialized versioning data of documents/asset/data objects
adapter: 'local'
Expand Down
42 changes: 42 additions & 0 deletions bundles/CoreBundle/src/Migrations/Version20230517115427.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

declare(strict_types=1);

/**
* Pimcore
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - Pimcore Commercial License (PCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license GPLv3 and PCL
*/

namespace Pimcore\Bundle\CoreBundle\Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

final class Version20230517115427 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add "object bricks" permission and remove category, when updating from new v11 installation to v11.0.1.';
}

public function up(Schema $schema): void
{
$this->addSql("INSERT INTO `users_permission_definitions` (`key`) VALUES ('objectbricks') ON DUPLICATE KEY UPDATE category = ''");
$this->addSql("INSERT INTO `users_permission_definitions` (`key`) VALUES ('fieldcollections') ON DUPLICATE KEY UPDATE category = ''");
$this->addSql("INSERT INTO `users_permission_definitions` (`key`) VALUES ('quantityValueUnits') ON DUPLICATE KEY UPDATE category = ''");
$this->addSql("INSERT INTO `users_permission_definitions` (`key`) VALUES ('classificationstore') ON DUPLICATE KEY UPDATE category = ''");
}

public function down(Schema $schema): void
{

}
}
5 changes: 3 additions & 2 deletions bundles/CoreBundle/src/Migrations/Version20230525131748.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use Pimcore\File;
use Symfony\Component\Filesystem\Filesystem;

final class Version20230525131748 extends AbstractMigration
{
Expand Down Expand Up @@ -75,12 +75,13 @@ private function renameConfigFolder(array $folders, string $search, string $repl
private function moveConfigFromFolders(array $folders): void
{
$configDir = \Pimcore::getContainer()->getParameter('kernel.project_dir') . '/var/config/';
$filesystem = new Filesystem();
foreach ($folders as $srcFolder => $targetFolder) {
$configFolder = $configDir . $srcFolder;
if (is_dir($configFolder)) {
$newConfigFolder = $configDir . $targetFolder;
if (!is_dir($newConfigFolder)) {
File::mkdir($newConfigFolder);
$filesystem->mkdir($newConfigFolder);
}

$files = array_diff(scandir($configFolder), ['.', '..']);
Expand Down
4 changes: 4 additions & 0 deletions bundles/InstallBundle/src/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,10 @@ protected function insertDatabaseContents(): void
'notifications_send',
'sites',
'objects_sort_method',
'objectbricks',
'fieldcollections',
'quantityValueUnits',
'classificationstore',
];

foreach ($userPermissions as $permission) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ docker run -u `id -u`:`id -g` --rm -v `pwd`:/var/www/html pimcore/pimcore:php8.2
* Start the needed services with `docker compose up -d`

4. Install pimcore and initialize the DB
`docker compose exec php vendor/bin/pimcore-install` (for demo package the installation can take a while)
`docker compose exec php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore` (for demo package the installation can take a while)

:::info

Expand Down
4 changes: 4 additions & 0 deletions doc/01_Getting_Started/02_Advanced_Installation_Topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,7 @@ pimcore:
general:
timezone: Europe/Berlin
```
## Office document preview
The feature for displaying a [preview of documents](../04_Assets/03_Working_with_Thumbnails/05_Document_Thumbnails.md) directly in Pimcore is optional. To use it, you must install either [Gotenberg](../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/06_Additional_Tools_Installation.md#gotenberg) or [LibreOffice](../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/06_Additional_Tools_Installation.md#libreoffice-pdftotext-inkscape-) according to your preference.
8 changes: 4 additions & 4 deletions doc/01_Getting_Started/06_Create_a_First_Project.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ don't need any custom code in our controller, so the action stays empty for the

### Create a Template
Now we create a template for our page:
* Create a new folder in `/templates` and name it like the controller (snake_case) (in this case `content`).
* Put a new Twig template into this folder and name it like our action in snake_case (`default.html.twig`).
* Create a new folder in `/templates` and name it like the controller (using the snake_case typo) (in the `content` case).
* Put a new Twig template into this folder and name it like our action (using the snake_case typo) (`default.html.twig`).

Then we can put some template code into it, for example:
```twig
Expand All @@ -61,7 +61,7 @@ Pimcore uses by default Symfony Twig engine, so you have the full power of Symfo
For details concerning editables (like `pimcore_input`, `pimcore_block`, ...) see [Editables](../03_Documents/01_Editables/README.md).

### Add a Layout
We can use Symfony`s [template inheritance and layout](https://symfony.com/doc/current/templates.html#template-inheritance-and-layouts) functionality
We can use Symfony's [template inheritance and layout](https://symfony.com/doc/current/templates.html#template-inheritance-and-layouts) functionality
to wrap our content page with another template which contains the main navigation, a sidebar, … using the following code:

```twig
Expand Down Expand Up @@ -185,7 +185,7 @@ Then we can also put some HTML and template code into it:

The code `{{ block('content') }}` is the placeholder where the content of the page will be inserted.

### Putting it all together with Pimcore Documents
### Putting It All Together With Pimcore Documents
Now we need to connect the action to a page in the Pimcore backend, so that the page knows which action
(and therefore also which template) needs to be executed/processed.
First, click right on *Home* in the *Documents* panel and Select *Add Page* > *Blank* to add a new page.
Expand Down
2 changes: 1 addition & 1 deletion doc/01_Getting_Started/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Getting Started with Pimcore
# Getting Started With Pimcore

This section provides a quick getting started tutorial for Pimcore and covers the following topics:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# URLs based on Documents and Pretty URLs
# URLs Based on Documents and Pretty URLs

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion doc/02_MVC/04_Routing_and_URLs/04_Redirects.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# URLs based on Redirects
# URLs Based on Redirects
:::caution

To use this feature, please enable the `PimcoreSeoBundle` in your `bundle.php` file and install it accordingly with the following command:
Expand Down
2 changes: 1 addition & 1 deletion doc/02_MVC/04_Routing_and_URLs/08_Working_with_Sites.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Working with Sites
# Working With Sites

## Introduction
With Sites, it is possible to create multi domain web applications within Pimcore.
Expand Down
2 changes: 1 addition & 1 deletion doc/03_Documents/09_Working_with_PHP_API.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Working with Documents via PHP API
# Working With Documents via PHP API

Pimcore provides the object orientated PHP API to work with Documents.

Expand Down
2 changes: 1 addition & 1 deletion doc/04_Assets/01_Working_with_PHP_API.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Working with Assets via PHP API
# Working With Assets via PHP API

Pimcore provides an object orientated PHP API to work with Assets.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Asset Document Thumbnails (PDF, docx, odf, ...)
# Asset Document Thumbnails (PDF, DOCX, ODF, ...)

This feature allows you to create an image thumbnail of nearly any document format, like doc(x), ppt(x), pdf, xls(x),
odt, ods, odp and many others.
Expand Down Expand Up @@ -30,5 +30,5 @@ if($asset instanceof Asset\Document) {
}
```

> This feature requires Ghostscript and at least Gotenberg or LibreOffice be installed on the server.
> This feature requires Ghostscript and at least [Gotenberg](../../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/06_Additional_Tools_Installation.md#gotenberg) or [LibreOffice](../../23_Installation_and_Upgrade/03_System_Setup_and_Hosting/06_Additional_Tools_Installation.md#libreoffice-pdftotext-inkscape-) to be installed on the server.
2 changes: 1 addition & 1 deletion doc/04_Assets/03_Working_with_Thumbnails/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Working with Thumbnails
# Working With Thumbnails

Pimcore provides a sophisticated thumbnail processing engine for calculating thumbnails based on source assets. So for
different output channels Pimcore can calculate and provide optimized images in terms of dimensions, file sizes, formats
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Select Types with Dynamic Options
# Select Types With Dynamic Options

For the select & multiselect datatype you can specify a dynamic options provider class.
This allows you to generate a list of valid options on-the-fly instead of using a static list.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Structure table
# Structured Table

## Add structure table to the class
## Add Structured Table to the Class

Similar to the table widget, the structured table can hold structured data.
But there are a few fundamental differences:
Expand Down
2 changes: 1 addition & 1 deletion doc/05_Objects/03_Working_with_PHP_API.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Working with Objects via PHP API
# Working With Objects via PHP API

Pimcore provides an object orientated PHP API to work with Objects. There are several generic functionalities
provided by Pimcore and for each Pimcore object class Pimcore generates corresponding PHP classes for working
Expand Down
2 changes: 1 addition & 1 deletion doc/06_Multi_Language_i18n/02_Localize_your_Documents.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Localize your Documents
# Localize Your Documents

Pimcore allows you to localize every document. You can find the setting in your document in the tab `Properties`.
There you can choose from language which is configured in the system settings.
Expand Down
2 changes: 1 addition & 1 deletion doc/07_Workflow_Management/09_Working_with_PHP_API.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Working with PHP API
# Working With PHP API

The Pimcore workflow management can also be used via PHP API.

Expand Down
2 changes: 1 addition & 1 deletion doc/19_Development_Tools_and_Details/07_Logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Of course, the corresponding monolog handler configuration can be adapted as nee
:::
## Writing your own log files
## Writing Your Own Log Files
To create a custom log entry, we need to create the monolog log channels and log handlers configuration. Here is an example on how to log in a custom filename called `custom.log`
```yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Authenticate against Pimcore Objects
# Authenticate Against Pimcore Objects

As Symfony's security component is quite complex, Pimcore provides base implementations to facilitate integrating the security
configuration with users stored as Pimcore objects.
Expand Down
4 changes: 2 additions & 2 deletions doc/19_Development_Tools_and_Details/11_Console_CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Pimcore implements the `Symfony\Console` component and provides `bin/console` as
entry point to console commands registered to the `Symfony\Console` application.


### Implementing own Commands
### Implementing Own Commands
Have a look at the `Symfony\Console` [documentation](https://symfony.com/doc/5.2/console.html)
for details how commands are implemented. However, it makes sense to let your command classes extend
`Pimcore\Console\AbstractCommand` to get some defaults like a helper for the
Expand All @@ -18,7 +18,7 @@ set up automatically (see below).
Command must be registered as services and tagged with the `console.command` tag. If you're using the default `services.yaml`
of Pimcore skeleton (or demos) for configuration, this is already done for you for the `App`. , thanks to autoconfiguration.

### Helpers provided by `Pimcore\Console\AbstractCommand`
### Helpers Provided By `Pimcore\Console\AbstractCommand`
The `AbstractCommand` base class provides helpers which make your life easier.

##### `--ignore-maintenance-mode`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pimcore:
| enabled | Set it true to enable Static Page Router |
| route_pattern | Regular expression to match routes for static page rendering |
## Static Page Generation with Ajax Request
## Static Page Generation With Ajax Request
The static pages with XMLHttpRequest fetches the data and displays it on the page, just like a standard document page.
However, if you are using the Fetch API to request the data, then must add the `XMLHttpRequest` header as shown below,
otherwise the sub-request will replace the content of the generated static page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The DeviceDetector helper makes it easy to implement the adaptive design approach in Pimcore.

### Using it anywhere in your Code
### Using It Anywhere in Your Code

```php
use Pimcore\Tool\DeviceDetector;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Working with Sessions
# Working With Sessions

If you need sessions, please use the native session handling provided by Symfony (configured through the `framework.session` config).
For details see [sessions docs](https://symfony.com/doc/current/components/http_foundation/sessions.html).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Add your own Dependencies and Packages
# Add Your Own Dependencies and Packages

Pimcore manages itself all dependencies using composer and therefore you can add your own dependencies by using
standard composer functionalities.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Loading service definitions from within a bundle
# Loading Service Definitions From Within a Bundle

If you want to load services from your bundle instead of having to define them in `config/services.yaml` you need to
create a dependency injection extension which is able to load your service definitions. You can find detailed documentation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Auto loading config and routing definitions
# Auto Loading Config and Routing Definitions

By default, Symfony does not load configuration and/or routing definitions from bundles but expects you to define everything
in `config/` (optionally importing config files from bundles or other locations). Pimcore extends the config loading
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Adding Object Layout types
# Adding Object Layout Types

> Note: This feature is available since v6.6.1
Expand Down
1 change: 0 additions & 1 deletion doc/20_Extending_Pimcore/13_Dependency_Injection_Tags.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Dependency Injection Tags

Please read the intro of [dependency injection tags](https://symfony.com/doc/current/reference/dic_tags.html) of Symfony first.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Deeplinks into Admin-Interface
# Deeplinks Into Admin-Interface

Pimcore offers the possibility to deeplink elements inside the admin-interface from an external application.

Expand Down
2 changes: 1 addition & 1 deletion doc/20_Extending_Pimcore/24_Add_Your_Own_Permissions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Add your own permissions
# Add Your Own Permissions

## Add your permission to the database
Choose a custom unique name and add it to the `users_permission_definitions` table in your database.
Expand Down
2 changes: 1 addition & 1 deletion doc/20_Extending_Pimcore/25_Implement_Your_Own_Search.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Implement your own search
# Implement Your Own Search

## Register Implementation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,40 @@ apt-get install libreoffice libreoffice-script-provider-python libreoffice-math

### Chromium (Chrome Headless)

It's possible to directly install and use the Chromium binary locally or in Docker Container and access to it via WebSocket connection
First of all, you need to add and install the required library via composer:
```bash
composer require chrome-php/chrome
```

You can then directly install and use the Chromium binary locally or use it in Docker Container, accessing it via WebSocket connection.

#### Locally
Please visit: [https://www.chromium.org/getting-involved/download-chromium](https://www.chromium.org/getting-involved/download-chromium)
Please follow the steps on [https://www.chromium.org/getting-involved/download-chromium](https://www.chromium.org/getting-involved/download-chromium) for installing Chromium locally.


#### Docker
Add a new service as
Add a new service as:
```dockerfile
chrome:
image: browserless/chrome
```
and set accordingly
- config `pimcore.chromium.uri` value , eg. `ws://chrome:3000/`
- web2print settings hostUrl as the Docker web server service eg. `http://nginx:80`

and set accordingly:
- config `pimcore.chromium.uri` value (e.g. `ws://chrome:3000/`)
- web2print settings hostUrl as the Docker web server service (e.g. `http://nginx:80`)

### Gotenberg

To install it, please add it in your Docker Compose services stack as [https://gotenberg.dev/docs/get-started/docker-compose#quick-start](https://gotenberg.dev/docs/get-started/docker-compose#quick-start).

Configure the Docker services accordingly:

- `pimcore.gotenberg.base_url` which by default to `gotenberg:3000`
- `pimcore.gotenberg.base_url` which by default to `http://gotenberg:3000`
- `pimcore.documents.preview_url_prefix` for example to `nginx:80`

Make sure to add and install the required library via composer:
```bash
composer require gotenberg/gotenberg-php
```

## Image Optimizers

Expand Down
Loading

0 comments on commit dd654dd

Please sign in to comment.