Book Image

Modernizing Enterprise CMS Using Pimcore

By : Daniele Fontani, Marco Guiducci, Francesco Minà
Book Image

Modernizing Enterprise CMS Using Pimcore

By: Daniele Fontani, Marco Guiducci, Francesco Minà

Overview of this book

Used by over eighty thousand companies worldwide, Pimcore is the leading open source enterprise-level content management system (CMS) solution. It is an impressive alternative to conventional CMSes and is ideal for creating e-commerce and complex enterprise websites. This book helps developers working with standard CMSes such as WordPress and Drupal to use their knowledge of CMSes to learn Pimcore CMS in a practical way. You'll start by learning what Pimcore is and explore its various services such as PIM, MDM, and DAM. The book then shows you various techniques for developing custom websites in Pimcore based on the scale of your organization. You'll learn how to use Pimcore to improve the digital transformation of a company by implementing enterprise Pimcore features. As you advance, you'll discover Pimcore's capabilities and features that make it a faster and more secure alternative to traditional CMSes. As well as demonstrating practical use cases, Modernizing Enterprise CMS Using Pimcore can help you understand the benefits of using Pimcore as a CMS solution, sharing best practices and proven techniques for designing professional Pimcore sites. By the end of this book, you'll be a trained Pimcore developer, able to create complex websites, and be well-versed in Pimcore's enterprise features such as MDM, PIM, and DAM.
Table of Contents (16 chapters)

Creating a custom mutation

In the previous section, you learned how to use mutation queries to create, update, and delete objects. These kinds of queries work well for simple scenarios but present some limitations in terms of the kinds of attributes that we can update or for the interdependence of multiple attributes. For example, on standard mutation queries, the QuantityValue fields cannot be filled.

In this section, you will learn how to create a custom mutation function and how to use that to update values that cannot be updated through standard mutation queries.

To create a new custom mutation function, we need to add a function definition to the Datahub configuration schema. This can be made by implementing a listener for the pimcore.Datahub.graphql.mutation.preBuild event.

In Chapter 12, Implementing Product Information Management, you learned how to implement an EventListener. In the following code snippet, you will see an example that will show how to implement a...